Skip to content

Commit 20dc5d3

Browse files
committed
Fixes deprecation warnings
1 parent 359fc4b commit 20dc5d3

4 files changed

Lines changed: 19 additions & 14 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
1+
## 2.2.1
2+
3+
- Fixes complile error on latest versions of Flutter.
4+
- Fixes deprecation warnings.
5+
16
## 2.2.0
27

3-
Update Dart to 3.0.0.
8+
- Updates Dart to 3.0.0.
49

510
## 2.1.2
611

7-
* Fixes url launch configuration in example on Android.
12+
- Fixes url launch configuration in example on Android.
813

914
## 2.1.1
1015

11-
* Replaces the deprecated `RaisedButton` with the new `ElevatedButton`.
12-
* Update dependencies to latest versions.
16+
- Replaces the deprecated `RaisedButton` with the new `ElevatedButton`.
17+
- Update dependencies to latest versions.
1318

1419
## 2.1.0
1520

16-
* Adds the possibility to add actions to the appbar.
21+
- Adds the possibility to add actions to the appbar.
1722

1823
## 2.0.0-nullsafety
1924

20-
* Migrates the templates to support sound null safety. Details are described in the [Announcing Dart null safety beta](https://medium.com/flutter/announcing-dart-null-safety-beta-4491da22077a) article.
25+
- Migrates the templates to support sound null safety. Details are described in the [Announcing Dart null safety beta](https://medium.com/flutter/announcing-dart-null-safety-beta-4491da22077a) article.
2126

2227
## 1.0.0
2328

24-
* Initial release. Code coming from flutter_cache_manager example.
29+
- Initial release. Code coming from flutter_cache_manager example.

lib/baseflow_plugin_template.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
library baseflow_plugin_template;
2-
31
export 'src/app.dart';
42
export 'src/page.dart';

lib/src/app.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class BaseflowPluginExample extends StatelessWidget {
4040
splashColor: themeMaterialColor.shade50,
4141
textTheme: ButtonTextTheme.primary,
4242
),
43-
bottomAppBarTheme: const BottomAppBarTheme(
43+
bottomAppBarTheme: const BottomAppBarThemeData(
4444
color: Color.fromRGBO(57, 58, 71, 1),
4545
),
4646
hintColor: themeMaterialColor.shade500,
@@ -80,7 +80,9 @@ class BaseflowPluginExample extends StatelessWidget {
8080
static MaterialColor createMaterialColor(Color color) {
8181
var strengths = <double>[.05];
8282
var swatch = <int, Color>{};
83-
final r = color.red, g = color.green, b = color.blue;
83+
final int r = (color.r * 255.0).round() & 0xff;
84+
final int g = (color.g * 255.0).round() & 0xff;
85+
final int b = (color.b * 255.0).round() & 0xff;
8486

8587
for (var i = 1; i < 10; i++) {
8688
strengths.add(0.1 * i);
@@ -94,6 +96,6 @@ class BaseflowPluginExample extends StatelessWidget {
9496
1,
9597
);
9698
}
97-
return MaterialColor(color.value, swatch);
99+
return MaterialColor(color.toARGB32(), swatch);
98100
}
99101
}

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: baseflow_plugin_template
22
description: A template for plugin examples
3-
version: 2.2.0
3+
version: 2.2.1
44
repository: https://github.com/Baseflow/baseflow_plugin_template
55

66
environment:
@@ -15,7 +15,7 @@ dependencies:
1515
dev_dependencies:
1616
flutter_test:
1717
sdk: flutter
18-
flutter_lints: ">=4.0.0 <6.0.0"
18+
flutter_lints: ^6.0.0
1919

2020
flutter:
2121
uses-material-design: true

0 commit comments

Comments
 (0)