Skip to content

Commit aa8f9fb

Browse files
committed
Miscellaneous fixes
- Fix button color (github material-components#133) - Restore obscureText on password field (github material-components#127) - Change AccentColorOverride to PrimaryColorOverride (github material-components#128, material-components#132) - Fix default BorderSide in CutCornersBorder constructor (github material-components#134)
1 parent 6256c6c commit aa8f9fb

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

mdc_100_series/lib/app.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ ThemeData _buildShrineTheme() {
8686
cardColor: kShrineBackgroundWhite,
8787
textSelectionColor: kShrinePink100,
8888
errorColor: kShrineErrorRed,
89-
buttonTheme: ButtonThemeData(
90-
textTheme: ButtonTextTheme.accent,
89+
buttonTheme: base.buttonTheme.copyWith(
90+
buttonColor: kShrinePink100,
9191
),
9292
primaryIconTheme: base.iconTheme.copyWith(color: kShrineBrown900),
9393
inputDecorationTheme: InputDecorationTheme(

mdc_100_series/lib/login.dart

+5-1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class _LoginPageState extends State<LoginPage> {
6161
decoration: InputDecoration(
6262
labelText: 'Password',
6363
),
64+
obscureText: true,
6465
),
6566
),
6667
ButtonBar(
@@ -105,7 +106,10 @@ class AccentColorOverride extends StatelessWidget {
105106
Widget build(BuildContext context) {
106107
return Theme(
107108
child: child,
108-
data: Theme.of(context).copyWith(accentColor: color),
109+
data: Theme.of(context).copyWith(
110+
accentColor: color,
111+
brightness: Brightness.dark,
112+
),
109113
);
110114
}
111115
}

mdc_100_series/lib/supplemental/cut_corners_border.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import 'package:flutter/widgets.dart';
1919

2020
class CutCornersBorder extends OutlineInputBorder {
2121
const CutCornersBorder({
22-
BorderSide borderSide: BorderSide.none,
22+
BorderSide borderSide: const BorderSide(),
2323
BorderRadius borderRadius: const BorderRadius.all(Radius.circular(2.0)),
2424
this.cut: 7.0,
2525
double gapPadding: 2.0,

0 commit comments

Comments
 (0)