Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(flutter): update dependency flutter to v3.16.0 #936

Merged
merged 3 commits into from
Nov 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .fvm/fvm_config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"flutterSdkVersion": "3.13.9",
"flutterSdkVersion": "3.16.0",
"flavors": {}
}
34 changes: 17 additions & 17 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev"
source: hosted
version: "1.17.2"
version: "1.18.0"
cupertino_icons:
dependency: "direct main"
description:
Expand Down Expand Up @@ -190,10 +190,10 @@ packages:
dependency: transitive
description:
name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.10.0"
path:
dependency: transitive
description:
Expand All @@ -206,10 +206,10 @@ packages:
dependency: transitive
description:
name: platform
sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76"
sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102
url: "https://pub.dev"
source: hosted
version: "3.1.0"
version: "3.1.2"
process:
dependency: transitive
description:
Expand Down Expand Up @@ -251,18 +251,18 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.11.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
string_scanner:
dependency: transitive
description:
Expand Down Expand Up @@ -291,10 +291,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev"
source: hosted
version: "0.6.0"
version: "0.6.1"
typed_data:
dependency: transitive
description:
Expand Down Expand Up @@ -323,18 +323,18 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: c620a6f783fa22436da68e42db7ebbf18b8c44b9a46ab911f666ff09ffd9153f
sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583
url: "https://pub.dev"
source: hosted
version: "11.7.1"
version: "11.10.0"
web:
dependency: transitive
description:
name: web
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
url: "https://pub.dev"
source: hosted
version: "0.1.4-beta"
version: "0.3.0"
webdriver:
dependency: transitive
description:
Expand All @@ -344,4 +344,4 @@ packages:
source: hosted
version: "3.0.2"
sdks:
dart: ">=3.1.0-185.0.dev <4.0.0"
dart: ">=3.2.0-194.0.dev <4.0.0"
5 changes: 4 additions & 1 deletion lib/advanced_theme/cubit/advanced_theme_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ class AdvancedThemeState extends Equatable {
final bool isDark;
final bool useMaterial3;

const AdvancedThemeState({this.isDark = false, this.useMaterial3 = false});
const AdvancedThemeState({
this.isDark = false,
this.useMaterial3 = true,
});

@override
List<Object> get props => [isDark, useMaterial3];
Expand Down
15 changes: 13 additions & 2 deletions lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ class _MaterialApp extends StatefulWidget {
}

class _MaterialAppState extends State<_MaterialApp> {
final _seedColor = Colors.blue;

@override
void initState() {
super.initState();
Expand All @@ -225,8 +227,17 @@ class _MaterialAppState extends State<_MaterialApp> {
builder: (context, state) {
return MaterialApp(
title: 'Appainter',
theme: ThemeData(),
darkTheme: ThemeData.dark(),
theme: ThemeData.from(
colorScheme: ColorScheme.fromSeed(
seedColor: _seedColor,
),
),
darkTheme: ThemeData.from(
colorScheme: ColorScheme.fromSeed(
seedColor: _seedColor,
brightness: Brightness.dark,
),
),
themeMode: state.themeMode,
home: state.status == HomeStatus.success
? const HomePage()
Expand Down
9 changes: 6 additions & 3 deletions lib/basic_theme/cubit/basic_theme_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class BasicThemeState extends Equatable {
Color? seedColor,
ColorScheme? colorScheme,
this.isDark = false,
this.useMaterial3 = false,
this.useMaterial3 = true,
}) : seedColor = seedColor ?? defaultSeedColor,
colorScheme = colorScheme ?? _colorSchemeLight;

Expand Down Expand Up @@ -96,9 +96,12 @@ class BasicThemeState extends Equatable {

ThemeData get theme {
return ThemeData.localize(
ThemeData.from(colorScheme: colorScheme),
ThemeData.from(
colorScheme: colorScheme,
useMaterial3: useMaterial3,
),
Typography.englishLike2018,
).copyWith(useMaterial3: useMaterial3);
);
}

Brightness get brightness => isDark ? Brightness.dark : Brightness.light;
Expand Down
2 changes: 1 addition & 1 deletion lib/home/views/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class HomePage extends StatefulWidget {
}

class HomePageState extends State<HomePage> {
static const _sdkVersion = '3.13.0+';
static const _sdkVersion = '3.16.0+';
static final _backgroundColorDark = Colors.grey[900]!;
static final _backgroundColorLight = Colors.grey[200]!;

Expand Down
2 changes: 1 addition & 1 deletion lib/home/widgets/material3_switch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Material3Switch extends StatelessWidget {
return Row(
children: [
Text(
'Material 3 (beta)',
'Material 3',
style: Theme.of(context).textTheme.titleMedium,
),
const _Switch(),
Expand Down
1 change: 1 addition & 0 deletions lib/theme_preview/views/theme_preview.dart
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ class ThemePreview extends StatelessWidget {
),
),
drawer: _Drawer(),
// ignore: prefer_const_constructors
body: TabBarView(
children: _pages,
),
Expand Down
34 changes: 17 additions & 17 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,10 @@ packages:
dependency: "direct main"
description:
name: collection
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev"
source: hosted
version: "1.17.2"
version: "1.18.0"
convert:
dependency: transitive
description:
Expand Down Expand Up @@ -743,10 +743,10 @@ packages:
dependency: transitive
description:
name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.10.0"
mime:
dependency: transitive
description:
Expand Down Expand Up @@ -1132,18 +1132,18 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.11.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
stream_transform:
dependency: transitive
description:
Expand Down Expand Up @@ -1180,26 +1180,26 @@ packages:
dependency: transitive
description:
name: test
sha256: "13b41f318e2a5751c3169137103b60c584297353d4b1761b66029bae6411fe46"
sha256: a1f7595805820fcc05e5c52e3a231aedd0b72972cb333e8c738a8b1239448b6f
url: "https://pub.dev"
source: hosted
version: "1.24.3"
version: "1.24.9"
test_api:
dependency: transitive
description:
name: test_api
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev"
source: hosted
version: "0.6.0"
version: "0.6.1"
test_core:
dependency: transitive
description:
name: test_core
sha256: "99806e9e6d95c7b059b7a0fc08f07fc53fabe54a829497f0d9676299f1e8637e"
sha256: a757b14fc47507060a162cc2530d9a4a2f92f5100a952c7443b5cad5ef5b106a
url: "https://pub.dev"
source: hosted
version: "0.5.3"
version: "0.5.9"
textwrap:
dependency: transitive
description:
Expand Down Expand Up @@ -1356,10 +1356,10 @@ packages:
dependency: transitive
description:
name: web
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
url: "https://pub.dev"
source: hosted
version: "0.1.4-beta"
version: "0.3.0"
web_socket_channel:
dependency: transitive
description:
Expand Down Expand Up @@ -1409,5 +1409,5 @@ packages:
source: hosted
version: "3.1.2"
sdks:
dart: ">=3.1.0 <4.0.0"
dart: ">=3.2.0-194.0.dev <4.0.0"
flutter: ">=3.13.9"
3 changes: 1 addition & 2 deletions test/color_theme/color_theme_editor_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,10 @@ void main() {
});

testWidgets('change color', (tester) async {
final opaqueColor = color.withOpacity(0.12);
await pumpApp(tester);
await tester.verifyColorPicker(
key,
opaqueColor,
color,
colorThemeCubit.dividerColorChanged,
);
});
Expand Down