Tablet layout
This commit is contained in:
parent
a685eb4dc6
commit
3e2cb33bc7
|
|
@ -1,23 +1,23 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:invoiceninja_flutter/redux/ui/ui_state.dart';
|
||||
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
||||
|
||||
class FormCard extends StatelessWidget {
|
||||
const FormCard({
|
||||
Key key,
|
||||
this.isResponsive = false,
|
||||
@required this.children,
|
||||
this.crossAxisAlignment,
|
||||
}) : super(key: key);
|
||||
|
||||
final List<Widget> children;
|
||||
final CrossAxisAlignment crossAxisAlignment;
|
||||
final bool isResponsive;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: calculateLayout(context) == AppLayout.mobile
|
||||
? const EdgeInsets.all(12)
|
||||
: const EdgeInsets.only(top: 12, left: 250, right: 250),
|
||||
padding: isResponsive
|
||||
? const EdgeInsets.only(top: 12, left: 250, right: 250)
|
||||
: const EdgeInsets.all(12),
|
||||
child: Card(
|
||||
elevation: 4.0,
|
||||
child: Padding(
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:invoiceninja_flutter/redux/ui/ui_state.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/buttons/elevated_button.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/progress_button.dart';
|
||||
import 'package:invoiceninja_flutter/ui/auth/login_vm.dart';
|
||||
|
|
@ -6,6 +7,7 @@ import 'package:invoiceninja_flutter/utils/formatting.dart';
|
|||
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/form_card.dart';
|
||||
import 'package:invoiceninja_flutter/utils/keys.dart';
|
||||
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
||||
|
||||
class LoginView extends StatefulWidget {
|
||||
const LoginView({
|
||||
|
|
@ -127,6 +129,7 @@ class _LoginState extends State<LoginView> {
|
|||
Form(
|
||||
key: _formKey,
|
||||
child: FormCard(
|
||||
isResponsive: calculateLayout(context) == AppLayout.mobile,
|
||||
children: <Widget>[
|
||||
isOneTimePassword
|
||||
? TextFormField(
|
||||
|
|
|
|||
Loading…
Reference in New Issue