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