Skip to content

Commit 7e2c548

Browse files
committed
Version 7.1.2
FIX: SubThemes ElevatedButton in M3 mode, when using `elevatedButtonSecondarySchemeColor` and there was no value defined on `elevatedButtonSchemeColor` it resulted in wrong color being used as default for `elevatedButtonSchemeColor`. Issue and test fixed. CHORE: Updated Android runner/embedder. Old one did not build with Flutter 3.10. Works again after update.
1 parent 5e3a8dc commit 7e2c548

File tree

32 files changed

+85
-64
lines changed

32 files changed

+85
-64
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
name: Deploy_Web
2222
on:
2323
push:
24-
branches: [master]
24+
branches: [none]
2525
paths-ignore:
2626
- "**.md"
2727
pull_request:

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
All changes to the **FlexColorScheme** (FCS) package are documented here.
44

5+
## 7.1.2
6+
7+
**May 17, 2023**
8+
9+
**PACKAGE**
10+
11+
**FIX**
12+
13+
* SubThemes ElevatedButton in M3 mode, when using `elevatedButtonSecondarySchemeColor` and there was no value defined on `elevatedButtonSchemeColor` it resulted in wrong color being used as default for `elevatedButtonSchemeColor`. Issue and test fixed.
14+
15+
**CHORE**
16+
17+
* Updated Android runner included for all the examples. The previous one no longer worked with Flutter 3.10, and its used Kotlin version. With included updated version, the examples can be built as Android apps again.
18+
519
## 7.1.1
620

721
**May 15, 2023**

example/.metadata

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This file should be version controlled.
55

66
version:
7-
revision: 62bd79521d8d007524e351747471ba66696fc2d4
7+
revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
88
channel: stable
99

1010
project_type: app
@@ -13,26 +13,26 @@ project_type: app
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: 62bd79521d8d007524e351747471ba66696fc2d4
17-
base_revision: 62bd79521d8d007524e351747471ba66696fc2d4
16+
create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
17+
base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
1818
- platform: android
19-
create_revision: 62bd79521d8d007524e351747471ba66696fc2d4
20-
base_revision: 62bd79521d8d007524e351747471ba66696fc2d4
19+
create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
20+
base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
2121
- platform: ios
22-
create_revision: 62bd79521d8d007524e351747471ba66696fc2d4
23-
base_revision: 62bd79521d8d007524e351747471ba66696fc2d4
22+
create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
23+
base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
2424
- platform: linux
25-
create_revision: 62bd79521d8d007524e351747471ba66696fc2d4
26-
base_revision: 62bd79521d8d007524e351747471ba66696fc2d4
25+
create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
26+
base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
2727
- platform: macos
28-
create_revision: 62bd79521d8d007524e351747471ba66696fc2d4
29-
base_revision: 62bd79521d8d007524e351747471ba66696fc2d4
28+
create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
29+
base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
3030
- platform: web
31-
create_revision: 62bd79521d8d007524e351747471ba66696fc2d4
32-
base_revision: 62bd79521d8d007524e351747471ba66696fc2d4
31+
create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
32+
base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
3333
- platform: windows
34-
create_revision: 62bd79521d8d007524e351747471ba66696fc2d4
35-
base_revision: 62bd79521d8d007524e351747471ba66696fc2d4
34+
create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
35+
base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
3636

3737
# User provided section
3838

example/android/app/build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

2828
android {
29+
namespace "com.example.example"
2930
compileSdkVersion flutter.compileSdkVersion
31+
ndkVersion flutter.ndkVersion
3032

3133
compileOptions {
3234
sourceCompatibility JavaVersion.VERSION_1_8
@@ -43,7 +45,9 @@ android {
4345

4446
defaultConfig {
4547
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
46-
applicationId "com.rydmike.themesplayground"
48+
applicationId "com.example.example"
49+
// You can update the following values to match your application needs.
50+
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
4751
minSdkVersion flutter.minSdkVersion
4852
targetSdkVersion flutter.targetSdkVersion
4953
versionCode flutterVersionCode.toInteger()

example/android/app/src/debug/AndroidManifest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.rydmike.themesplayground">
3-
<!-- Flutter needs it to communicate with the running application
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<!-- The INTERNET permission is required for development. Specifically,
3+
the Flutter tool needs it to communicate with the running application
44
to allow setting breakpoints, to provide hot reload, etc.
55
-->
66
<uses-permission android:name="android.permission.INTERNET"/>

example/android/app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.rydmike.themesplayground">
3-
<application
4-
android:label="Themes"
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<application
3+
android:label="example"
54
android:name="${applicationName}"
65
android:icon="@mipmap/ic_launcher">
76
<activity
@@ -31,5 +30,4 @@
3130
android:name="flutterEmbedding"
3231
android:value="2" />
3332
</application>
34-
<uses-permission android:name="android.permission.INTERNET"/>
3533
</manifest>

example/android/app/src/main/kotlin/com/example/example/MainActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.rydmike.themesplayground
1+
package com.example.example
22

33
import io.flutter.embedding.android.FlutterActivity
44

example/android/app/src/main/kotlin/com/rydmike/example/MainActivity.kt

Lines changed: 0 additions & 6 deletions
This file was deleted.

example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

Lines changed: 0 additions & 5 deletions
This file was deleted.

example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml

Lines changed: 0 additions & 5 deletions
This file was deleted.
Loading
Loading
Loading
Loading
Loading

example/android/app/src/main/res/values-night/styles.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
44
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
55
<!-- Show a splash screen on the activity. Automatically removed when
6-
Flutter draws its first frame -->
6+
the Flutter engine draws its first frame -->
77
<item name="android:windowBackground">@drawable/launch_background</item>
88
</style>
99
<!-- Theme applied to the Android Window as soon as the process has started.

example/android/app/src/main/res/values/styles.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
44
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
55
<!-- Show a splash screen on the activity. Automatically removed when
6-
Flutter draws its first frame -->
6+
the Flutter engine draws its first frame -->
77
<item name="android:windowBackground">@drawable/launch_background</item>
88
</style>
99
<!-- Theme applied to the Android Window as soon as the process has started.

example/android/app/src/profile/AndroidManifest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.rydmike.themesplayground">
3-
<!-- Flutter needs it to communicate with the running application
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<!-- The INTERNET permission is required for development. Specifically,
3+
the Flutter tool needs it to communicate with the running application
44
to allow setting breakpoints, to provide hot reload, etc.
55
-->
66
<uses-permission android:name="android.permission.INTERNET"/>

example/android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
buildscript {
2-
ext.kotlin_version = '1.6.10'
2+
ext.kotlin_version = '1.7.10'
33
repositories {
44
google()
55
mavenCentral()
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:4.1.0'
9+
classpath 'com.android.tools.build:gradle:7.3.0'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}
@@ -26,6 +26,6 @@ subprojects {
2626
project.evaluationDependsOn(':app')
2727
}
2828

29-
task clean(type: Delete) {
29+
tasks.register("clean", Delete) {
3030
delete rootProject.buildDir
3131
}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Fri Jun 23 08:50:38 CEST 2017
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
43
zipStoreBase=GRADLE_USER_HOME
54
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip

example/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ EXTERNAL SOURCES:
2727

2828
SPEC CHECKSUMS:
2929
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
30-
path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9
31-
shared_preferences_foundation: 986fc17f3d3251412d18b0265f9c64113a8c2472
30+
path_provider_foundation: eaf5b3e458fc0e5fbb9940fb09980e853fe058b8
31+
shared_preferences_foundation: e2dae3258e06f44cc55f49d42024fd8dd03c590c
3232
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
3333

3434
PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import Flutter
2+
import UIKit
3+
import XCTest
4+
5+
class RunnerTests: XCTestCase {
6+
7+
func testExample() {
8+
// If you add code to the Runner application, consider adding tests here.
9+
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
10+
}
11+
12+
}

example/lib/example5_themes_playground/widgets/panels/theme_simulator/app_example_material3/component_screen.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2023,7 +2023,6 @@ class _NavigationRailSectionState extends State<NavigationRailSection> {
20232023
child: const Icon(Icons.create), onPressed: () {}),
20242024
groupAlignment: 0.0,
20252025
selectedIndex: navRailIndex,
2026-
labelType: NavigationRailLabelType.selected,
20272026
destinations: <NavigationRailDestination>[
20282027
...destinations.map((ExampleDestination destination) {
20292028
return NavigationRailDestination(

example/lib/example_copy_paste_from_playground/main.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ class _DemoAppState extends State<DemoApp> {
5454
// Themes Playground app available at:
5555
// https://rydmike.com/flexcolorscheme/themesplayground-v7
5656
// And do remember to comment the default Flutter theme above.
57-
5857
theme: FlexThemeData.light(
5958
useMaterial3: true,
6059
scheme: FlexScheme.redWine,

example/lib/shared/const/app.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class App {
4141
// build numbers.
4242
static const String versionMajor = '7';
4343
static const String versionMinor = '1';
44-
static const String versionPatch = '1';
44+
static const String versionPatch = '2';
4545
static const String versionBuild = '01';
4646
static const String version = '$versionMajor.$versionMinor.$versionPatch '
4747
'Build-$versionBuild';

example/lib/shared/widgets/universal/showcase_material.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ class _SegmentedButtonShowcaseState extends State<SegmentedButtonShowcase> {
440440
ButtonSegment<Calendar>(
441441
value: Calendar.month,
442442
icon: Icon(Icons.calendar_view_month),
443-
label: Text('Month'),
443+
label: Text('Mont'),
444444
),
445445
ButtonSegment<Calendar>(
446446
value: Calendar.year,
@@ -471,7 +471,7 @@ class _SegmentedButtonShowcaseState extends State<SegmentedButtonShowcase> {
471471
ButtonSegment<Calendar>(
472472
value: Calendar.month,
473473
icon: Icon(Icons.calendar_view_month),
474-
label: Text('Month'),
474+
label: Text('Mont'),
475475
enabled: false,
476476
),
477477
ButtonSegment<Calendar>(
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import FlutterMacOS
2+
import Cocoa
3+
import XCTest
4+
5+
class RunnerTests: XCTestCase {
6+
7+
func testExample() {
8+
// If you add code to the Runner application, consider adding tests here.
9+
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
10+
}
11+
12+
}

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ packages:
127127
path: ".."
128128
relative: true
129129
source: path
130-
version: "7.1.1"
130+
version: "7.1.2"
131131
flex_seed_scheme:
132132
dependency: "direct main"
133133
description:

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flex_color_scheme_example
22
description: Examples that demonstrate how to use the FlexColorScheme package.
3-
version: 7.1.1
3+
version: 7.1.2
44
publish_to: 'none'
55
environment:
66
sdk: '>=3.0.0 <4.0.0'

lib/src/flex_sub_themes.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2281,7 +2281,7 @@ class FlexSubThemes {
22812281
}
22822282
return colorScheme.onSurface.withAlpha(kAlphaVeryLowDisabled);
22832283
}
2284-
return foreground;
2284+
return background;
22852285
});
22862286
}
22872287

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flex_color_scheme
22
description: A Flutter package to use and make beautiful Material design based themes.
3-
version: 7.1.1
3+
version: 7.1.2
44
homepage: https://docs.flexcolorscheme.com
55
repository: https://github.com/rydmike/flex_color_scheme
66
issue_tracker: https://github.com/rydmike/flex_color_scheme/issues

test/flex_sub_themes_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2136,7 +2136,7 @@ void main() {
21362136
onBaseSchemeColor: SchemeColor.tertiary,
21372137
useMaterial3: true,
21382138
).style!.backgroundColor!.resolve(<MaterialState>{}),
2139-
equals(colorScheme.primary),
2139+
equals(colorScheme.tertiary),
21402140
);
21412141
// Selected background, M3
21422142
expect(

0 commit comments

Comments
 (0)