Skip to content

Commit

Permalink
Merge branch 'trunk' into 859-clear-up-info-messages-from-flutter-ana…
Browse files Browse the repository at this point in the history
…lyze-flutter-beta-323-edition
  • Loading branch information
CurtlyCritchlow authored Jun 14, 2024
2 parents aff1b75 + d29a67d commit d3f4173
Show file tree
Hide file tree
Showing 21 changed files with 552 additions and 518 deletions.
6 changes: 5 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
interval: "daily"
groups:
github-actions:
patterns:
- "*"
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jobs:
egress-policy: audit

- name: 'Checkout Repository'
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: 'Dependency Review'
uses: actions/dependency-review-action@72eb03d02c7872a771aacd928f3123ac62ad6d3a # v4.3.3
3 changes: 2 additions & 1 deletion .github/workflows/melos_bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ jobs:
melos-bootstrap:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # v2.16.0
with:
channel: "stable"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false

Expand Down Expand Up @@ -67,6 +67,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # v3.25.8
uses: github/codeql-action/upload-sarif@23acc5c183826b7a8a97bce3cecc52db901f8251 # v3.25.10
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- beta

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # v2.16.0
with:
channel: "${{ matrix.flutter-channel}}"
Expand Down
60 changes: 32 additions & 28 deletions packages/at_onboarding_flutter/example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import 'dart:async';

import 'package:at_app_flutter/at_app_flutter.dart' show AtEnv;
import 'package:at_onboarding_flutter/at_onboarding_flutter.dart';
import 'package:at_onboarding_flutter_example/switch_atsign.dart';
import 'package:flutter/material.dart';
import 'package:at_onboarding_flutter/at_onboarding_flutter.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:path_provider/path_provider.dart'
show getApplicationSupportDirectory;
import 'package:at_app_flutter/at_app_flutter.dart' show AtEnv;
import 'package:path_provider/path_provider.dart' show getApplicationSupportDirectory;

Future<void> main() async {
await AtEnv.load();
Expand All @@ -22,8 +22,7 @@ Future<AtClientPreference> loadAtClientPreference() async {
..isLocalStoreRequired = true;
}

final StreamController<ThemeMode> updateThemeMode =
StreamController<ThemeMode>.broadcast();
final StreamController<ThemeMode> updateThemeMode = StreamController<ThemeMode>.broadcast();

class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);
Expand Down Expand Up @@ -52,16 +51,14 @@ class MyAppState extends State<MyApp> {
brightness: Brightness.light,
primaryColor: const Color(0xFFf4533d),
scaffoldBackgroundColor: Colors.white,
colorScheme: ThemeData.light().colorScheme.copyWith(
primary: const Color(0xFFf4533d), surface: Colors.white),
colorScheme:
ThemeData.light().colorScheme.copyWith(primary: const Color(0xFFf4533d), surface: Colors.white),
),
darkTheme: ThemeData().copyWith(
brightness: Brightness.dark,
primaryColor: Colors.blue,
scaffoldBackgroundColor: Colors.grey[850],
colorScheme: ThemeData.dark()
.colorScheme
.copyWith(primary: Colors.blue, surface: Colors.grey[850]),
colorScheme: ThemeData.dark().colorScheme.copyWith(primary: Colors.blue, surface: Colors.grey[850]),
),
locale: _currentLocale,
localizationsDelegates: const [
Expand All @@ -81,9 +78,7 @@ class MyAppState extends State<MyApp> {
actions: <Widget>[
IconButton(
onPressed: () {
updateThemeMode.sink.add(themeMode == ThemeMode.light
? ThemeMode.dark
: ThemeMode.light);
updateThemeMode.sink.add(themeMode == ThemeMode.light ? ThemeMode.dark : ThemeMode.light);
},
icon: Icon(
Theme.of(context).brightness == Brightness.light
Expand Down Expand Up @@ -114,7 +109,15 @@ class MyAppState extends State<MyApp> {
rootEnvironment: AtEnv.rootEnvironment,
appAPIKey: AtEnv.appApiKey,
theme: AtOnboardingTheme(
primaryColor: null,
primaryColor: Colors.blue,
textTheme: const TextTheme(
titleMedium: TextStyle(
fontSize: 16,
color: Colors.black,
fontWeight: FontWeight.w600,
),
// ),
),
),
showPopupSharedStorage: true,
),
Expand All @@ -123,10 +126,7 @@ class MyAppState extends State<MyApp> {

switch (result?.status) {
case AtOnboardingResultStatus.success:
Navigator.push(
context,
MaterialPageRoute(
builder: (_) => const HomeScreen()));
Navigator.push(context, MaterialPageRoute(builder: (_) => const HomeScreen()));
break;
case null:
case AtOnboardingResultStatus.error:
Expand Down Expand Up @@ -156,6 +156,15 @@ class MyAppState extends State<MyApp> {
domain: AtEnv.rootDomain,
rootEnvironment: AtEnv.rootEnvironment,
appAPIKey: AtEnv.appApiKey,
theme: AtOnboardingTheme(
primaryColor: Colors.blue,
textTheme: const TextTheme(
titleMedium: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
),
),
),
),
);
}
Expand All @@ -171,17 +180,13 @@ class MyAppState extends State<MyApp> {
DropdownButton(
onChanged: (value) {
setState(() {
value == 'en'
? _currentLocale = const Locale('en')
: _currentLocale = const Locale('fr');
value == 'en' ? _currentLocale = const Locale('en') : _currentLocale = const Locale('fr');
});
},
value: _currentLocale.languageCode,
items: const [
DropdownMenuItem(
value: 'en', child: Text('English')),
DropdownMenuItem(
value: 'fr', child: Text('French')),
DropdownMenuItem(value: 'en', child: Text('English')),
DropdownMenuItem(value: 'fr', child: Text('French')),
],
)
],
Expand Down Expand Up @@ -226,8 +231,7 @@ class _HomeScreenState extends State<HomeScreen> {
await showModalBottomSheet(
context: context,
backgroundColor: Colors.transparent,
builder: (context) =>
AtSignBottomSheet(atSignList: atSignList ?? []),
builder: (context) => AtSignBottomSheet(atSignList: atSignList ?? []),
);
}
setState(() {});
Expand Down
4 changes: 4 additions & 0 deletions packages/at_onboarding_flutter/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ dev_dependencies:

dependency_overrides:
intl: ^0.17.0
at_onboarding_flutter:
path: ../
# at_onboarding_flutter: ^6.1.5


# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class _AtOnboardingAccountsScreenState
Widget build(BuildContext context) {
final theme = Theme.of(context).copyWith(
primaryColor: widget.config.theme?.primaryColor,
textTheme: widget.config.theme?.textTheme,
colorScheme: Theme.of(context).colorScheme.copyWith(
primary: widget.config.theme?.primaryColor,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class _AtOnboardingActivateScreenState
Widget build(BuildContext context) {
final theme = Theme.of(context).copyWith(
primaryColor: widget.config.theme?.primaryColor,
textTheme: widget.config.theme?.textTheme,
colorScheme: Theme.of(context).colorScheme.copyWith(
primary: widget.config.theme?.primaryColor,
),
Expand All @@ -85,25 +86,27 @@ class _AtOnboardingActivateScreenState
],
),
body: Center(
child: Container(
padding: const EdgeInsets.all(AtOnboardingDimens.paddingNormal),
margin: const EdgeInsets.all(AtOnboardingDimens.paddingNormal),
constraints: const BoxConstraints(
maxWidth: 400,
),
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
AtSyncIndicator(
color: theme.primaryColor,
),
const SizedBox(height: 10),
Text(
AtOnboardingLocalizations.current.msg_wait_fetching_atSign,
),
],
child: SingleChildScrollView(
child: Container(
padding: const EdgeInsets.all(AtOnboardingDimens.paddingNormal),
margin: const EdgeInsets.all(AtOnboardingDimens.paddingNormal),
constraints: const BoxConstraints(
maxWidth: 400,
),
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
AtSyncIndicator(
color: theme.primaryColor,
),
const SizedBox(height: 10),
Text(
AtOnboardingLocalizations.current.msg_wait_fetching_atSign,
),
],
),
),
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class _AtOnboardingBackupScreenState extends State<AtOnboardingBackupScreen> {
Widget build(BuildContext context) {
final theme = Theme.of(context).copyWith(
primaryColor: widget.config.theme?.primaryColor,
textTheme: widget.config.theme?.textTheme,
colorScheme: Theme.of(context).colorScheme.copyWith(
primary: widget.config.theme?.primaryColor,
),
Expand Down
Loading

0 comments on commit d3f4173

Please sign in to comment.