Skip to content

Commit

Permalink
Update to flutter 3.24
Browse files Browse the repository at this point in the history
  • Loading branch information
DavBfr committed Oct 22, 2024
1 parent f0deb90 commit f036239
Show file tree
Hide file tree
Showing 22 changed files with 30 additions and 32 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Implement about dialog orientation
- Add license extractor
- Add license dialog
- Update to flutter 3.24

## 2.1.3

Expand Down
3 changes: 0 additions & 3 deletions example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@
.pub/
/build/

# Web related
lib/generated_plugin_registrant.dart

# Symbolication related
app.*.symbols

Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ _author: David PHAM-VAN <[email protected]>
homepage: https://github.com/DavBfr/flutter_about

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=3.0.0 <4.0.0"

dependencies:
about:
Expand Down
4 changes: 2 additions & 2 deletions lib/src/about.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class AboutPage extends StatelessWidget {
/// derived from the nearest [Title] widget. The version, icon, and legalese
/// values default to the empty string.
const AboutPage({
Key? key,
super.key,
this.title,
this.scaffoldBuilder,
this.applicationName,
Expand All @@ -57,7 +57,7 @@ class AboutPage extends StatelessWidget {
this.children,
this.values = const {},
this.orientation = Axis.vertical,
}) : super(key: key);
});

/// The title of the page.
///
Expand Down
4 changes: 2 additions & 2 deletions lib/src/about_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class AboutContent extends StatefulWidget {
/// derived from the nearest [Title] widget. The version, icon, and legalese
/// values default to the empty string.
const AboutContent({
Key? key,
super.key,
this.applicationName,
this.applicationVersion,
this.applicationIcon,
Expand All @@ -52,7 +52,7 @@ class AboutContent extends StatefulWidget {
this.children,
this.values = const {},
this.orientation = Axis.vertical,
}) : super(key: key);
});

/// The name of the application.
///
Expand Down
4 changes: 2 additions & 2 deletions lib/src/about_list_title.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class AboutPageListTile extends StatelessWidget {
/// derived from the nearest [Title] widget. The version, icon, and legalese
/// values default to the empty string.
const AboutPageListTile({
Key? key,
super.key,
this.icon = const Icon(null),
this.title,
this.child,
Expand All @@ -56,7 +56,7 @@ class AboutPageListTile extends StatelessWidget {
this.values = const {},
this.trailing,
this.orientation = Axis.vertical,
}) : super(key: key);
});

/// The icon to show for this drawer item.
///
Expand Down
4 changes: 2 additions & 2 deletions lib/src/license_detail.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ class LicenseParagraphSeparator implements LicenseParagraph {

class LicenseDetail extends StatelessWidget {
const LicenseDetail({
Key? key,
super.key,
this.package,
this.scaffoldBuilder,
required this.paragraphs,
}) : super(key: key);
});

/// The builder for the Scaffold around the content.
///
Expand Down
4 changes: 2 additions & 2 deletions lib/src/license_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import 'markdown.dart';

class LicenseDialog extends StatelessWidget {
const LicenseDialog({
Key? key,
super.key,
required this.text,
}) : super(key: key);
});

final String text;

Expand Down
4 changes: 2 additions & 2 deletions lib/src/licenses.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ class LicenseListPage extends StatefulWidget {
/// The licenses shown on the [LicenseListPage] are those returned by the
/// [LicenseRegistry] API, which can be used to add more licenses to the list.
const LicenseListPage({
Key? key,
super.key,
this.title,
this.scaffoldBuilder,
this.values,
}) : super(key: key);
});

/// The page title
final Widget? title;
Expand Down
4 changes: 2 additions & 2 deletions lib/src/licenses_list_title.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ class LicensesPageListTile extends StatelessWidget {
/// derived from the nearest [Title] widget. The version, icon, and legalese
/// values default to the empty string.
const LicensesPageListTile({
Key? key,
super.key,
this.icon,
this.title,
this.trailing,
this.scaffoldBuilder,
this.values,
}) : super(key: key);
});

/// The icon to show for this drawer item.
///
Expand Down
10 changes: 4 additions & 6 deletions lib/src/markdown.dart
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class MarkdownTemplate extends StatefulWidget {
/// derived from the nearest [Title] widget. The version and legalese values
/// default to the empty string.
const MarkdownTemplate({
Key? key,
super.key,
this.applicationName,
bool? useMustache,
this.mustacheValues,
Expand All @@ -134,8 +134,7 @@ class MarkdownTemplate extends StatefulWidget {
this.styleSheetTheme = MarkdownStyleSheetBaseTheme.material,
this.syntaxHighlighter,
}) : useMustache = useMustache ?? mustacheValues != null,
tapHandler = tapHandler ?? const UrlMarkdownTapHandler(),
super(key: key);
tapHandler = tapHandler ?? const UrlMarkdownTapHandler();

/// The name of the application.
///
Expand Down Expand Up @@ -340,7 +339,7 @@ class MarkdownPage extends StatefulWidget {
/// derived from the nearest [Title] widget. The version and legalese values
/// default to the empty string.
const MarkdownPage({
Key? key,
super.key,
this.title,
this.scaffoldBuilder,
this.applicationName,
Expand All @@ -361,8 +360,7 @@ class MarkdownPage extends StatefulWidget {
this.shrinkWrap = true,
this.styleSheetTheme = MarkdownStyleSheetBaseTheme.material,
this.syntaxHighlighter,
}) : useMustache = useMustache ?? mustacheValues != null,
super(key: key);
}) : useMustache = useMustache ?? mustacheValues != null;

/// The name of the application.
///
Expand Down
4 changes: 2 additions & 2 deletions lib/src/markdown_list_title.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class MarkdownPageListTile extends StatelessWidget {
///
/// The title and filename of the markdown template are required.
const MarkdownPageListTile({
Key? key,
super.key,
this.icon,
required this.title,
this.scaffoldBuilder,
Expand All @@ -53,7 +53,7 @@ class MarkdownPageListTile extends StatelessWidget {
this.shrinkWrap = true,
this.styleSheetTheme = MarkdownStyleSheetBaseTheme.material,
this.syntaxHighlighter,
}) : super(key: key);
});

/// The icon to show for this drawer item.
///
Expand Down
8 changes: 4 additions & 4 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ homepage: https://github.com/DavBfr/flutter_about
version: 2.2.0

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=3.0.0 <4.0.0"

dependencies:
flutter:
sdk: flutter
flutter_markdown: ^0.6.0
flutter_markdown: ^0.7.0
markdown: ">=4.0.0 <8.0.0"
path: ^1.8.0
path: ^1.9.0
simple_mustache: ^2.1.0
url_launcher: ">=6.0.0 <7.0.0"

dev_dependencies:
flutter_lints: ^2.0.0
flutter_lints: ^5.0.0
flutter_test:
sdk: flutter

Expand Down
6 changes: 4 additions & 2 deletions test/about_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ const MethodChannel _channel = MethodChannel('plugins.flutter.io/package_info');

void main() {
setUpAll(() {
_channel.setMockMethodCallHandler((methodCall) async {
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(_channel, (methodCall) async {
switch (methodCall.method) {
case 'getAll':
return {
Expand All @@ -42,7 +43,8 @@ void main() {
});

tearDownAll(() {
_channel.setMockMethodCallHandler(null);
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(_channel, null);
});

group('AboutPage', () {
Expand Down
Binary file modified test/goldens/about-page-list-tile.material.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/goldens/about-page.cupertino.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/goldens/about-page.custom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/goldens/about-page.material.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/goldens/license-detail.cupertino.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/goldens/license-detail.material.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/goldens/license-list-page.cupertino.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/goldens/license-list-page.material.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f036239

Please sign in to comment.