1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 08:15:16 +00:00

Continue to fix deprecation warnings

This commit is contained in:
2021-03-13 15:28:34 +01:00
parent 819e2a7590
commit 230cb2c018
13 changed files with 32 additions and 28 deletions

View File

@ -174,9 +174,7 @@ class __CreateAccountRouteBodyState extends State<_CreateAccountRouteBody> {
// Submit button
Center(
child: RaisedButton(
color: Colors.blue,
textColor: Colors.white,
child: ElevatedButton(
onPressed: _submitForm,
child: Text("Submit"),
),

View File

@ -61,7 +61,7 @@ class _ResetPasswordBodyState extends SafeState<_ResetPasswordBody> {
/// Step 3b - Answer security questions
List<String> _questions;
var _questionsControllers = List<TextEditingController>();
var _questionsControllers = <TextEditingController>[];
List<String> get _answers =>
_questionsControllers.map((f) => f.text).toList();

View File

@ -127,7 +127,7 @@ class _LoginRouteState extends State<LoginRoute> {
padding: EdgeInsets.all(8.0),
child: _loading
? CircularProgressIndicator()
: RaisedButton(
: ElevatedButton(
child: Text(tr("Sign in")),
onPressed: valid ? () => _submitForm(context) : null,
),

View File

@ -37,7 +37,7 @@ mixin MainRoute implements StatefulWidget {}
/// Public interface of home controller
abstract class MainController extends State<MainRoute> {
final _pagesStack = List<PageInfo>();
final _pagesStack = <PageInfo>[];
/// Default page of the application
PageInfo get defaultPage;

View File

@ -77,7 +77,7 @@ class __PasswordResetBodyState extends SafeState<_PasswordResetBody> {
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text(tr("You can choose a new password.")),
OutlineButton(
OutlinedButton(
onPressed: _changePassword,
child: Text(tr("Choose a new password")),
)
@ -97,7 +97,7 @@ class __PasswordResetBodyState extends SafeState<_PasswordResetBody> {
tr("Congratulations! Your password has now been successfully changed!"),
textAlign: TextAlign.center,
),
OutlineButton(
OutlinedButton(
onPressed: _quitScreen,
child: Text(tr("Login")),
)