This repository has been archived by the owner on Oct 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to Material Design 3 (Material You)
- Loading branch information
Showing
31 changed files
with
383 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,4 +67,4 @@ SPEC CHECKSUMS: | |
|
||
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c | ||
|
||
COCOAPODS: 1.11.0 | ||
COCOAPODS: 1.11.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
import '../../../core/extensions/string.dart'; | ||
|
||
class AboutDialogM3 extends StatelessWidget { | ||
const AboutDialogM3({ | ||
required this.applicationName, | ||
required this.applicationVersion, | ||
required this.applicationIcon, | ||
this.applicationLegalese, | ||
this.children, | ||
Key? key, | ||
}) : super(key: key); | ||
|
||
static const double _textVerticalSeparation = 18; | ||
|
||
final String applicationName; | ||
final String applicationVersion; | ||
final Widget applicationIcon; | ||
final String? applicationLegalese; | ||
final List<Widget>? children; | ||
|
||
@override | ||
Widget build(BuildContext context) => AlertDialog( | ||
actionsPadding: const EdgeInsets.only(bottom: 8, right: 8), | ||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(28))), | ||
content: ListBody( | ||
children: <Widget>[ | ||
Row( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: <Widget>[ | ||
IconTheme(data: Theme.of(context).iconTheme, child: applicationIcon), | ||
Expanded( | ||
child: Padding( | ||
padding: const EdgeInsets.symmetric(horizontal: 24), | ||
child: ListBody( | ||
children: <Widget>[ | ||
Text(applicationName, style: Theme.of(context).textTheme.headline5), | ||
Text(applicationVersion, style: Theme.of(context).textTheme.bodyText2), | ||
const SizedBox(height: _textVerticalSeparation), | ||
Text(applicationLegalese ?? '', style: Theme.of(context).textTheme.caption), | ||
], | ||
), | ||
), | ||
), | ||
], | ||
), | ||
...?children, | ||
], | ||
), | ||
actions: <Widget>[ | ||
TextButton( | ||
child: Text(MaterialLocalizations.of(context).viewLicensesButtonLabel.toBeginningOfSentenceCase()), | ||
onPressed: () => showLicensePage( | ||
context: context, | ||
applicationName: applicationName, | ||
applicationVersion: applicationVersion, | ||
applicationIcon: applicationIcon, | ||
applicationLegalese: applicationLegalese, | ||
), | ||
), | ||
TextButton( | ||
child: Text(MaterialLocalizations.of(context).closeButtonLabel.toBeginningOfSentenceCase()), | ||
onPressed: () => Navigator.pop(context), | ||
), | ||
], | ||
scrollable: true, | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.