Merge pull request #2486 from krille-chan/krille/particles-login-page

feat: Display particle animation on login page
This commit is contained in:
Krille-chan 2026-01-29 17:58:40 +01:00 committed by GitHub
commit 2619cd4332
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 46 additions and 22 deletions

View file

@ -1,5 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:particles_network/particles_network.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import 'package:url_launcher/url_launcher_string.dart'; import 'package:url_launcher/url_launcher_string.dart';
@ -45,33 +46,47 @@ class LoginScaffold extends StatelessWidget {
end: Alignment.bottomRight, end: Alignment.bottomRight,
), ),
), ),
child: Column( child: Stack(
children: [ children: [
const SizedBox(height: 16), if (!MediaQuery.of(context).disableAnimations)
Expanded( ParticleNetwork(
child: Center( particleColor: theme.colorScheme.primary,
child: Padding( lineColor: theme.colorScheme.secondary,
padding: const EdgeInsets.symmetric(horizontal: 16.0), ),
child: Material( Column(
borderRadius: BorderRadius.circular(AppConfig.borderRadius), children: [
clipBehavior: Clip.hardEdge, const SizedBox(height: 16),
elevation: theme.appBarTheme.scrolledUnderElevation ?? 4, Expanded(
shadowColor: theme.appBarTheme.shadowColor, child: Center(
child: ConstrainedBox( child: Padding(
constraints: isMobileMode padding: const EdgeInsets.symmetric(horizontal: 16.0),
? const BoxConstraints() child: Material(
: const BoxConstraints(maxWidth: 480, maxHeight: 640), borderRadius: BorderRadius.circular(
child: Scaffold( AppConfig.borderRadius,
key: const Key('LoginScaffold'), ),
appBar: appBar, clipBehavior: Clip.hardEdge,
body: SafeArea(child: body), elevation: theme.appBarTheme.scrolledUnderElevation ?? 4,
shadowColor: theme.appBarTheme.shadowColor,
child: ConstrainedBox(
constraints: isMobileMode
? const BoxConstraints()
: const BoxConstraints(
maxWidth: 480,
maxHeight: 640,
),
child: Scaffold(
key: const Key('LoginScaffold'),
appBar: appBar,
body: SafeArea(child: body),
),
),
), ),
), ),
), ),
), ),
), const _PrivacyButtons(mainAxisAlignment: .center),
],
), ),
const _PrivacyButtons(mainAxisAlignment: .center),
], ],
), ),
); );

View file

@ -1172,6 +1172,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.23.3" version: "0.23.3"
particles_network:
dependency: "direct main"
description:
name: particles_network
sha256: "10350bbf446b504acf591b928b1a39ba687237a8895d73e6567abba1a2740c4c"
url: "https://pub.dev"
source: hosted
version: "1.9.0"
path: path:
dependency: "direct main" dependency: "direct main"
description: description:

View file

@ -57,6 +57,7 @@ dependencies:
mime: ^2.0.0 mime: ^2.0.0
opus_caf_converter_dart: ^1.0.1 opus_caf_converter_dart: ^1.0.1
package_info_plus: ^8.3.1 package_info_plus: ^8.3.1
particles_network: ^1.9.0
path: ^1.9.0 path: ^1.9.0
path_provider: ^2.1.2 path_provider: ^2.1.2
permission_handler: ^12.0.1 permission_handler: ^12.0.1

View file

@ -1,5 +1,5 @@
#!/bin/sh -ve #!/bin/sh -ve
flutter pub add fcm_shared_isolate:0.1.0 flutter pub add fcm_shared_isolate:0.2.0
sed -i '' 's,//<GOOGLE_SERVICES>,,g' lib/utils/background_push.dart sed -i '' 's,//<GOOGLE_SERVICES>,,g' lib/utils/background_push.dart
flutter clean flutter clean
flutter pub get flutter pub get