child: ConstrainedBox(
constraints: BoxConstraints.tightFor(
height: MediaQuery.of(context).size.height),
- child: Padding(
- padding: const EdgeInsets.all(8.0),
- child: Column(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: <Widget>[
- Padding(
- padding: const EdgeInsets.fromLTRB(0, 100.0, 0, 30.0),
- child: Icon(
- Icons.lock,
- size: 48,
+ child: SafeArea(
+ child: Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: <Widget>[
+ Padding(
+ padding: const EdgeInsets.fromLTRB(0, 100.0, 0, 30.0),
+ child: Icon(
+ Icons.lock,
+ size: 48,
+ ),
),
- ),
- Text(
- 'Verify',
- style: TextStyle(
- fontSize: 36,
- color: Colors.white,
- fontWeight: FontWeight.bold),
- ),
- Text(
- 'Check your second factor provider',
- style: TextStyle(
- color: Colors.white38, fontWeight: FontWeight.bold),
- ),
- Padding(
- padding: const EdgeInsets.fromLTRB(0, 50.0, 0, 8.0),
- child: Container(
- width: 175,
- child: Column(
- children: <Widget>[
- DropdownButtonFormField(
- decoration: InputDecoration(
- labelText: 'Method',
- icon: Icon(Icons.input)),
- items: _tfa_kinds
- .map((e) => DropdownMenuItem(
- child: ListTile(title: Text(e)),
- value: e,
- ))
- .toList(),
- onChanged: (String? value) {
- setState(() {
- _selected_tfa_kind = value!;
- });
- },
- selectedItemBuilder: (context) =>
- _tfa_kinds.map((e) => Text(e)).toList(),
- value: _selected_tfa_kind,
- ),
- TextField(
- controller: _codeController,
- textAlign: TextAlign.center,
+ Text(
+ 'Verify',
+ style: TextStyle(
+ fontSize: 36,
+ color: Colors.white,
+ fontWeight: FontWeight.bold),
+ ),
+ Text(
+ 'Check your second factor provider',
+ style: TextStyle(
+ color: Colors.white38,
+ fontWeight: FontWeight.bold),
+ ),
+ Padding(
+ padding: const EdgeInsets.fromLTRB(0, 50.0, 0, 8.0),
+ child: Container(
+ width: 175,
+ child: Column(
+ children: <Widget>[
+ DropdownButtonFormField(
decoration: InputDecoration(
- labelText: 'Code', icon: Icon(Icons.pin)),
- autofocus: true,
- onSubmitted: (value) => _submitTfaCode()),
- ],
+ labelText: 'Method',
+ icon: Icon(Icons.input)),
+ items: _tfa_kinds
+ .map((e) => DropdownMenuItem(
+ child: ListTile(title: Text(e)),
+ value: e,
+ ))
+ .toList(),
+ onChanged: (String? value) {
+ setState(() {
+ _selected_tfa_kind = value!;
+ });
+ },
+ selectedItemBuilder: (context) =>
+ _tfa_kinds.map((e) => Text(e)).toList(),
+ value: _selected_tfa_kind,
+ ),
+ TextField(
+ controller: _codeController,
+ textAlign: TextAlign.center,
+ decoration: InputDecoration(
+ labelText: 'Code',
+ icon: Icon(Icons.pin)),
+ autofocus: true,
+ onSubmitted: (value) => _submitTfaCode()),
+ ],
+ ),
),
),
- ),
- Expanded(
- child: Align(
- alignment: Alignment.bottomCenter,
- child: Container(
- width: MediaQuery.of(context).size.width,
- child: TextButton(
- style: TextButton.styleFrom(
- foregroundColor: Colors.white,
- backgroundColor: Color(0xFFE47225),
- disabledBackgroundColor: Colors.grey,
+ Expanded(
+ child: Align(
+ alignment: Alignment.bottomCenter,
+ child: Container(
+ width: MediaQuery.of(context).size.width,
+ child: TextButton(
+ style: TextButton.styleFrom(
+ foregroundColor: Colors.white,
+ backgroundColor: Color(0xFFE47225),
+ disabledBackgroundColor: Colors.grey,
+ ),
+ onPressed: () => _submitTfaCode(),
+ child: Text('Continue'),
),
- onPressed: () => _submitTfaCode(),
- child: Text('Continue'),
),
),
),
- ),
- ],
+ ],
+ ),
),
),
),