Fix Unlock Styling
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Sarah Jamie Lewis 2021-04-12 17:02:26 -07:00
parent 8bb3e5f546
commit 6223d7848a
2 changed files with 37 additions and 26 deletions

View File

@ -1362,6 +1362,13 @@ ThemeData mkThemeData(Settings opaque) {
overlayColor: MaterialStateProperty.all(opaque.current().defaultButtonActiveColor()),
padding: MaterialStateProperty.all(EdgeInsets.all(20))),
),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(opaque.current().defaultButtonColor()),
foregroundColor: MaterialStateProperty.all(opaque.current().defaultButtonTextColor()),
overlayColor: MaterialStateProperty.all(opaque.current().defaultButtonActiveColor()),
padding: MaterialStateProperty.all(EdgeInsets.all(20))),
),
dialogTheme: DialogTheme(
backgroundColor: opaque.current().backgroundPaneColor(),
titleTextStyle: TextStyle(color: opaque.current().mainTextColor()),

View File

@ -2,6 +2,7 @@ import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter_app/settings.dart';
import 'package:flutter_app/widgets/passwordfield.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:flutter_app/widgets/profilerow.dart';
import 'package:provider/provider.dart';
@ -94,32 +95,35 @@ class _ProfileMgrViewState extends State<ProfileMgrView> {
context: context,
builder: (BuildContext context) {
return Container(
height: 200, // bespoke value courtesy of the [TextField] docs
color: Colors.pink[50],
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text(AppLocalizations.of(context).enterProfilePassword),
TextField(
obscureText: true,
controller: ctrlrPassword,
decoration: InputDecoration(
border: OutlineInputBorder(),
labelText: AppLocalizations.of(context).password1Label,
),
),
ElevatedButton(
child: Text(AppLocalizations.of(context).unlock, semanticsLabel: AppLocalizations.of(context).unlock),
onPressed: () {
Provider.of<FlwtchState>(context, listen: false).cwtch.LoadProfiles(ctrlrPassword.value.text);
Navigator.pop(context);
},
),
],
)),
);
height: 200, // bespoke value courtesy of the [TextField] docs
child: Center(
child: Padding(
padding: EdgeInsets.all(10.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text(AppLocalizations.of(context).enterProfilePassword),
SizedBox(
height: 20,
),
CwtchPasswordField(
controller: ctrlrPassword,
),
SizedBox(
height: 20,
),
ElevatedButton(
child: Text(AppLocalizations.of(context).unlock, semanticsLabel: AppLocalizations.of(context).unlock),
onPressed: () {
Provider.of<FlwtchState>(context, listen: false).cwtch.LoadProfiles(ctrlrPassword.value.text);
ctrlrPassword.text = "";
Navigator.pop(context);
},
),
],
)),
));
});
}