From d4da2dd431510d939890a374d9d8c057012f2431 Mon Sep 17 00:00:00 2001 From: krille-chan Date: Wed, 29 May 2024 19:30:53 +0200 Subject: [PATCH] build: Use Flutter 3.19.6 for Linux --- .github/workflows/release.yaml | 2 +- lib/pages/chat/chat_view.dart | 3 +- lib/pages/chat/events/message.dart | 3 +- lib/pages/chat/typing_indicators.dart | 3 +- .../homeserver_picker/homeserver_app_bar.dart | 3 +- lib/pages/login/login_view.dart | 3 +- .../user_bottom_sheet_view.dart | 3 +- snap/snapcraft.yaml | 33 +++++++++++++++++-- 8 files changed, 43 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6d2ba636..1a0e42e8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -110,7 +110,7 @@ jobs: - run: cat .github/workflows/versions.env >> $GITHUB_ENV - uses: subosito/flutter-action@v2 with: - flutter-version: ${{ env.FLUTTER_VERSION }} + flutter-version: 3.19.6 # Workaround for not working on 3.22 cache: true - name: Install dependencies run: sudo apt-get update && sudo apt-get install curl clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev liblzma-dev libjsoncpp-dev cmake-data libsecret-1-dev libsecret-1-0 librhash0 libssl-dev -y diff --git a/lib/pages/chat/chat_view.dart b/lib/pages/chat/chat_view.dart index 9bf4932a..9974a9e7 100644 --- a/lib/pages/chat/chat_view.dart +++ b/lib/pages/chat/chat_view.dart @@ -303,7 +303,8 @@ class ChatView extends StatelessWidget { clipBehavior: Clip.hardEdge, color: Theme.of(context) .colorScheme - .surfaceContainerHighest, + // ignore: deprecated_member_use + .surfaceVariant, borderRadius: const BorderRadius.all( Radius.circular(24), ), diff --git a/lib/pages/chat/events/message.dart b/lib/pages/chat/events/message.dart index 8e17de9d..cba2b939 100644 --- a/lib/pages/chat/events/message.dart +++ b/lib/pages/chat/events/message.dart @@ -77,7 +77,8 @@ class Message extends StatelessWidget { final client = Matrix.of(context).client; final ownMessage = event.senderId == client.userID; final alignment = ownMessage ? Alignment.topRight : Alignment.topLeft; - var color = Theme.of(context).colorScheme.surfaceContainerHighest; + // ignore: deprecated_member_use + var color = Theme.of(context).colorScheme.surfaceVariant; final displayTime = event.type == EventTypes.RoomCreate || nextEvent == null || !event.originServerTs.sameEnvironment(nextEvent!.originServerTs); diff --git a/lib/pages/chat/typing_indicators.dart b/lib/pages/chat/typing_indicators.dart index 0eb2c080..c30789ff 100644 --- a/lib/pages/chat/typing_indicators.dart +++ b/lib/pages/chat/typing_indicators.dart @@ -81,7 +81,8 @@ class TypingIndicators extends StatelessWidget { padding: const EdgeInsets.only(top: topPadding), child: Material( color: - Theme.of(context).colorScheme.surfaceContainerHighest, + // ignore: deprecated_member_use + Theme.of(context).colorScheme.surfaceVariant, borderRadius: const BorderRadius.only( topLeft: Radius.circular(2), topRight: Radius.circular(AppConfig.borderRadius), diff --git a/lib/pages/homeserver_picker/homeserver_app_bar.dart b/lib/pages/homeserver_picker/homeserver_app_bar.dart index c5f3f6b0..8a1ad4e2 100644 --- a/lib/pages/homeserver_picker/homeserver_app_bar.dart +++ b/lib/pages/homeserver_picker/homeserver_app_bar.dart @@ -93,7 +93,8 @@ class HomeserverAppBar extends StatelessWidget { : null, fillColor: FluffyThemes.isColumnMode(context) ? Theme.of(context).colorScheme.surface - : Theme.of(context).colorScheme.surfaceContainerHighest, + // ignore: deprecated_member_use + : Theme.of(context).colorScheme.surfaceVariant, prefixText: '${L10n.of(context)!.homeserver}: ', hintText: L10n.of(context)!.enterYourHomeserver, suffixIcon: const Icon(Icons.search), diff --git a/lib/pages/login/login_view.dart b/lib/pages/login/login_view.dart index 80dae7a7..8ec092cb 100644 --- a/lib/pages/login/login_view.dart +++ b/lib/pages/login/login_view.dart @@ -24,7 +24,8 @@ class LoginView extends StatelessWidget { final textFieldFillColor = FluffyThemes.isColumnMode(context) ? Theme.of(context).colorScheme.surface - : Theme.of(context).colorScheme.surfaceContainerHighest; + // ignore: deprecated_member_use + : Theme.of(context).colorScheme.surfaceVariant; return LoginScaffold( enforceMobileMode: Matrix.of(context).client.isLogged(), diff --git a/lib/pages/user_bottom_sheet/user_bottom_sheet_view.dart b/lib/pages/user_bottom_sheet/user_bottom_sheet_view.dart index 883a4806..da60ee59 100644 --- a/lib/pages/user_bottom_sheet/user_bottom_sheet_view.dart +++ b/lib/pages/user_bottom_sheet/user_bottom_sheet_view.dart @@ -120,7 +120,8 @@ class UserBottomSheetView extends StatelessWidget { padding: const EdgeInsets.all(12.0), child: Material( color: - Theme.of(context).colorScheme.surfaceContainerHighest, + // ignore: deprecated_member_use + Theme.of(context).colorScheme.surfaceVariant, borderRadius: BorderRadius.circular(AppConfig.borderRadius), child: ListTile( diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 86b7eb24..a32ad570 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -64,13 +64,40 @@ parts: stage-snaps: - zenity-integration + flutter-git: + source: https://github.com/flutter/flutter.git + source-tag: 3.19.6 + source-depth: 1 + plugin: nil + override-build: | + mkdir -p $CRAFT_PART_INSTALL/usr/bin + mkdir -p $CRAFT_PART_INSTALL/usr/libexec + cp -r $CRAFT_PART_SRC $CRAFT_PART_INSTALL/usr/libexec/flutter + ln -s $CRAFT_PART_INSTALL/usr/libexec/flutter/bin/flutter $CRAFT_PART_INSTALL/usr/bin/flutter + ln -s $SNAPCRAFT_PART_INSTALL/usr/libexec/flutter/bin/dart $SNAPCRAFT_PART_INSTALL/usr/bin/dart + $CRAFT_PART_INSTALL/usr/bin/flutter doctor + build-packages: + - clang + - cmake + - curl + - libgtk-3-dev + - ninja-build + - unzip + - xz-utils + - zip + override-prime: '' + fluffychat: - plugin: flutter + after: [flutter-git] + plugin: nil source: . override-build: | # Workaround for Flutter build error: rm -rf build - craftctl default + + flutter build linux --release -v + mkdir -p $CRAFT_PART_INSTALL/bin/ + cp -r build/linux/*/release/bundle/* $CRAFT_PART_INSTALL/bin/ build-packages: - libjsoncpp-dev - curl @@ -87,7 +114,7 @@ slots: apps: fluffychat: - command: fluffychat + command: bin/fluffychat extensions: [ gnome ] plugs: - audio-playback