Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Replace some deprecated properties #105

Merged
merged 2 commits into from
May 17, 2021
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
37 changes: 36 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,37 @@
Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.idea
.atom/
.buildlog/
.history
.svn/
.firebase/
.flutter-plugins-dependencies

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
test_goldens/failures/

# Other
pubspec.lock
2 changes: 1 addition & 1 deletion docs/components/banners.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ ThemeData _buildShrineTheme() {
buttonColor: shrinePink100,
scaffoldBackgroundColor: shrineBackgroundWhite,
cardColor: shrineBackgroundWhite,
textSelectionColor: shrinePink100,
textSelectionTheme: TextSelectionThemeData(selectionColor: shrinePink100),
errorColor: shrineErrorRed,
buttonTheme: ButtonThemeData(
colorScheme: _shrineColorScheme.copyWith(primary: shrinePink400),
Expand Down
20 changes: 10 additions & 10 deletions docs/components/bottom_navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,19 @@ BottomNavigationBar(
},
items: [
BottomNavigationBarItem(
title: Text('Favorites'),
label: 'Favorites',
icon: Icon(Icons.favorite),
),
BottomNavigationBarItem(
title: Text('Music'),
label: 'Music',
icon: Icon(Icons.music_note),
),
BottomNavigationBarItem(
title: Text('Places'),
label: 'Places',
icon: Icon(Icons.location_on),
),
BottomNavigationBarItem(
title: Text('News'),
label: 'News',
icon: Icon(Icons.library_books),
),
],
Expand Down Expand Up @@ -113,7 +113,7 @@ The following is an anatomy diagram for the bottom navigation bar:

|   | Property |
| --- | --- |
| **Text label** | `title` |
| **Text label** | `label` |
| **Color** | `unselectedItemColor` |
| **Typography** | `unselectedLabelStyle` |

Expand All @@ -129,7 +129,7 @@ The following is an anatomy diagram for the bottom navigation bar:

|   | Property |
| --- | --- |
| **Text label** | `title`|
| **Text label** | `label`|
| **Color** | `selectedItemColor` |
| **Typography** | `selectedLabelStyle` |

Expand Down Expand Up @@ -183,19 +183,19 @@ class _MyHomePageState extends State<MyHomePage> {
},
items: [
BottomNavigationBarItem(
title: Text('Favorites'),
label: 'Favorites',
icon: Icon(Icons.favorite),
),
BottomNavigationBarItem(
title: Text('Music'),
label: 'Music',
icon: Icon(Icons.music_note),
),
BottomNavigationBarItem(
title: Text('Places'),
label: 'Places',
icon: Icon(Icons.location_on),
),
BottomNavigationBarItem(
title: Text('News'),
label: 'News',
icon: Icon(Icons.library_books),
),
],
Expand Down
2 changes: 1 addition & 1 deletion docs/components/bottom_sheets.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ ThemeData _buildShrineTheme() {
buttonColor: shrinePink100,
scaffoldBackgroundColor: shrineBackgroundWhite,
cardColor: shrineBackgroundWhite,
textSelectionColor: shrinePink100,
textSelectionTheme: TextSelectionThemeData(selectionColor: shrinePink100),
errorColor: shrineErrorRed,
buttonTheme: const ButtonThemeData(
colorScheme: _shrineColorScheme,
Expand Down
2 changes: 1 addition & 1 deletion docs/components/buttons.md
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ ThemeData _buildShrineTheme() {
buttonColor: shrinePink100,
scaffoldBackgroundColor: shrineBackgroundWhite,
cardColor: shrineBackgroundWhite,
textSelectionColor: shrinePink100,
textSelectionTheme: TextSelectionThemeData(selectionColor: shrinePink100),
errorColor: shrineErrorRed,
primaryIconTheme: _customIconTheme(base.iconTheme),
textTheme: _buildShrineTextTheme(base.textTheme),
Expand Down
2 changes: 1 addition & 1 deletion docs/components/cards.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ ThemeData _buildShrineTheme() {
buttonColor: shrinePink100,
scaffoldBackgroundColor: shrineBackgroundWhite,
cardColor: shrineBackgroundWhite,
textSelectionColor: shrinePink100,
textSelectionTheme: TextSelectionThemeData(selectionColor: shrinePink100),
errorColor: shrineErrorRed,
buttonTheme: const ButtonThemeData(
colorScheme: _shrineColorScheme,
Expand Down
2 changes: 1 addition & 1 deletion docs/components/checkboxes.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ ThemeData _buildShrineTheme() {
buttonColor: shrinePink100,
scaffoldBackgroundColor: shrineBackgroundWhite,
cardColor: shrineBackgroundWhite,
textSelectionColor: shrinePink100,
textSelectionTheme: TextSelectionThemeData(selectionColor: shrinePink100),
errorColor: shrineErrorRed,
primaryIconTheme: _customIconTheme(base.iconTheme),
textTheme: _buildShrineTextTheme(base.textTheme),
Expand Down
2 changes: 1 addition & 1 deletion docs/components/chips.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ ThemeData _buildShrineTheme() {
buttonColor: shrinePink100,
scaffoldBackgroundColor: shrineBackgroundWhite,
cardColor: shrineBackgroundWhite,
textSelectionColor: shrinePink100,
textSelectionTheme: TextSelectionThemeData(selectionColor: shrinePink100),
errorColor: shrineErrorRed,
primaryIconTheme: _customIconTheme(base.iconTheme),
textTheme: _buildShrineTextTheme(base.textTheme),
Expand Down
2 changes: 1 addition & 1 deletion docs/components/dartpad/banners/theme/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ThemeData _buildShrineTheme() {
buttonColor: shrinePink100,
scaffoldBackgroundColor: shrineBackgroundWhite,
cardColor: shrineBackgroundWhite,
textSelectionColor: shrinePink100,
textSelectionTheme: TextSelectionThemeData(selectionColor: shrinePink100),
errorColor: shrineErrorRed,
buttonTheme: ButtonThemeData(
colorScheme: _shrineColorScheme.copyWith(primary: shrinePink400),
Expand Down
8 changes: 4 additions & 4 deletions docs/components/dartpad/bottom_navigation/regular/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ class _MyHomePageState extends State<MyHomePage> {
},
items: [
BottomNavigationBarItem(
title: Text('Favorites'),
label: 'Favorites',
icon: Icon(Icons.favorite),
),
BottomNavigationBarItem(
title: Text('Music'),
label: 'Music',
icon: Icon(Icons.music_note),
),
BottomNavigationBarItem(
title: Text('Places'),
label: 'Places',
icon: Icon(Icons.location_on),
),
BottomNavigationBarItem(
title: Text('News'),
label: 'News',
icon: Icon(Icons.library_books),
),
],
Expand Down
8 changes: 4 additions & 4 deletions docs/components/dartpad/bottom_navigation/theme/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ class _MyHomePageState extends State<MyHomePage> {
},
items: [
BottomNavigationBarItem(
title: Text('Favorites'),
label: 'Favorites',
icon: Icon(Icons.favorite),
),
BottomNavigationBarItem(
title: Text('Music'),
label: 'Music',
icon: Icon(Icons.music_note),
),
BottomNavigationBarItem(
title: Text('Places'),
label: 'Places',
icon: Icon(Icons.location_on),
),
BottomNavigationBarItem(
title: Text('News'),
label: 'News',
icon: Icon(Icons.library_books),
),
],
Expand Down
78 changes: 39 additions & 39 deletions docs/components/dartpad/bottom_sheets/theme/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ ThemeData _buildShrineTheme() {
buttonColor: shrinePink100,
scaffoldBackgroundColor: shrineBackgroundWhite,
cardColor: shrineBackgroundWhite,
textSelectionColor: shrinePink100,
textSelectionTheme: TextSelectionThemeData(selectionColor: shrinePink100),
errorColor: shrineErrorRed,
buttonTheme: const ButtonThemeData(
colorScheme: _shrineColorScheme,
Expand All @@ -93,44 +93,44 @@ ThemeData _buildShrineTheme() {
TextTheme _buildShrineTextTheme(TextTheme base) {
return base
.copyWith(
headline: base.headline.copyWith(
fontWeight: FontWeight.w500,
letterSpacing: defaultLetterSpacing,
),
title: base.title.copyWith(
fontSize: 18,
letterSpacing: defaultLetterSpacing,
),
caption: base.caption.copyWith(
fontWeight: FontWeight.w400,
fontSize: 14,
letterSpacing: defaultLetterSpacing,
),
body2: base.body2.copyWith(
fontWeight: FontWeight.w500,
fontSize: 16,
letterSpacing: defaultLetterSpacing,
),
body1: base.body1.copyWith(
letterSpacing: defaultLetterSpacing,
),
subhead: base.subhead.copyWith(
letterSpacing: defaultLetterSpacing,
),
display1: base.display1.copyWith(
letterSpacing: defaultLetterSpacing,
),
button: base.button.copyWith(
fontWeight: FontWeight.w500,
fontSize: 14,
letterSpacing: defaultLetterSpacing,
),
)
headline5: base.headline5.copyWith(
fontWeight: FontWeight.w500,
letterSpacing: defaultLetterSpacing,
),
headline6: base.headline6.copyWith(
fontSize: 18,
letterSpacing: defaultLetterSpacing,
),
caption: base.caption.copyWith(
fontWeight: FontWeight.w400,
fontSize: 14,
letterSpacing: defaultLetterSpacing,
),
bodyText1: base.bodyText1.copyWith(
fontWeight: FontWeight.w500,
fontSize: 16,
letterSpacing: defaultLetterSpacing,
),
bodyText2: base.bodyText2.copyWith(
letterSpacing: defaultLetterSpacing,
),
subtitle1: base.subtitle1.copyWith(
letterSpacing: defaultLetterSpacing,
),
headline4: base.headline4.copyWith(
letterSpacing: defaultLetterSpacing,
),
button: base.button.copyWith(
fontWeight: FontWeight.w500,
fontSize: 14,
letterSpacing: defaultLetterSpacing,
),
)
.apply(
fontFamily: 'Rubik',
displayColor: shrineBrown900,
bodyColor: shrineBrown900,
);
fontFamily: 'Rubik',
displayColor: shrineBrown900,
bodyColor: shrineBrown900,
);
}

const ColorScheme _shrineColorScheme = ColorScheme(
Expand Down Expand Up @@ -162,4 +162,4 @@ const Color shrineErrorRed = Color(0xFFC5032B);
const Color shrineSurfaceWhite = Color(0xFFFFFBFA);
const Color shrineBackgroundWhite = Colors.white;

const defaultLetterSpacing = 0.03;
const defaultLetterSpacing = 0.03;
2 changes: 1 addition & 1 deletion docs/components/dartpad/buttons/theme/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ ThemeData _buildShrineTheme() {
buttonColor: shrinePink100,
scaffoldBackgroundColor: shrineBackgroundWhite,
cardColor: shrineBackgroundWhite,
textSelectionColor: shrinePink100,
textSelectionTheme: TextSelectionThemeData(selectionColor: shrinePink100),
errorColor: shrineErrorRed,
primaryIconTheme: _customIconTheme(base.iconTheme),
textTheme: _buildShrineTextTheme(base.textTheme),
Expand Down
2 changes: 1 addition & 1 deletion docs/components/dartpad/cards/theme/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ ThemeData _buildShrineTheme() {
buttonColor: shrinePink100,
scaffoldBackgroundColor: shrineBackgroundWhite,
cardColor: shrineBackgroundWhite,
textSelectionColor: shrinePink100,
textSelectionTheme: TextSelectionThemeData(selectionColor: shrinePink100),
errorColor: shrineErrorRed,
buttonTheme: const ButtonThemeData(
colorScheme: _shrineColorScheme,
Expand Down
2 changes: 1 addition & 1 deletion docs/components/dartpad/checkboxes/theme/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ ThemeData _buildShrineTheme() {
buttonColor: shrinePink100,
scaffoldBackgroundColor: shrineBackgroundWhite,
cardColor: shrineBackgroundWhite,
textSelectionColor: shrinePink100,
textSelectionTheme: TextSelectionThemeData(selectionColor: shrinePink100),
errorColor: shrineErrorRed,
primaryIconTheme: _customIconTheme(base.iconTheme),
textTheme: _buildShrineTextTheme(base.textTheme),
Expand Down
2 changes: 1 addition & 1 deletion docs/components/dartpad/chips/theme/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ ThemeData _buildShrineTheme() {
buttonColor: shrinePink100,
scaffoldBackgroundColor: shrineBackgroundWhite,
cardColor: shrineBackgroundWhite,
textSelectionColor: shrinePink100,
textSelectionTheme: TextSelectionThemeData(selectionColor: shrinePink100),
errorColor: shrineErrorRed,
primaryIconTheme: _customIconTheme(base.iconTheme),
textTheme: _buildShrineTextTheme(base.textTheme),
Expand Down
2 changes: 1 addition & 1 deletion docs/components/dartpad/data_tables/theme/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ ThemeData _buildShrineTheme() {
buttonColor: shrinePink100,
scaffoldBackgroundColor: shrineBackgroundWhite,
cardColor: shrineBackgroundWhite,
textSelectionColor: shrinePink100,
textSelectionTheme: TextSelectionThemeData(selectionColor: shrinePink100),
errorColor: shrineErrorRed,
buttonTheme: const ButtonThemeData(
colorScheme: _shrineColorScheme,
Expand Down
3 changes: 1 addition & 2 deletions docs/components/dartpad/date_pickers/theme/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ ThemeData _buildShrineTheme() {
buttonColor: shrinePink100,
scaffoldBackgroundColor: shrineBackgroundWhite,
cardColor: shrineBackgroundWhite,
textSelectionColor: shrinePink100,
textSelectionTheme: TextSelectionThemeData(selectionColor: shrinePink100),
errorColor: shrineErrorRed,
buttonTheme: const ButtonThemeData(
colorScheme: _shrineColorScheme,
Expand Down Expand Up @@ -138,4 +138,3 @@ const Color shrineSurfaceWhite = Color(0xFFFFFBFA);
const Color shrineBackgroundWhite = Colors.white;

const defaultLetterSpacing = 0.03;

2 changes: 1 addition & 1 deletion docs/components/dartpad/dialogs/theme/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ ThemeData _buildShrineTheme() {
buttonColor: shrinePink100,
scaffoldBackgroundColor: shrineBackgroundWhite,
cardColor: shrineBackgroundWhite,
textSelectionColor: shrinePink100,
textSelectionTheme: TextSelectionThemeData(selectionColor: shrinePink100),
errorColor: shrineErrorRed,
buttonTheme: const ButtonThemeData(
colorScheme: _shrineColorScheme,
Expand Down
2 changes: 1 addition & 1 deletion docs/components/dartpad/dividers/theme/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ ThemeData _buildShrineTheme() {
buttonColor: shrinePink100,
scaffoldBackgroundColor: shrineBackgroundWhite,
cardColor: shrineBackgroundWhite,
textSelectionColor: shrinePink100,
textSelectionTheme: TextSelectionThemeData(selectionColor: shrinePink100),
errorColor: shrineErrorRed,
buttonTheme: const ButtonThemeData(
colorScheme: _shrineColorScheme,
Expand Down
Loading