insert pages
This commit is contained in:
112
lib/pages/user_edit.dart
Normal file
112
lib/pages/user_edit.dart
Normal file
@@ -0,0 +1,112 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
|
||||
import '../theme/theme.dart';
|
||||
import '../theme/theme.dart';
|
||||
import '../widget/local_text.dart';
|
||||
import '../widget/progress.dart';
|
||||
|
||||
class UserEditPage extends StatefulWidget {
|
||||
@override
|
||||
_UserEditPageState createState() => _UserEditPageState();
|
||||
}
|
||||
|
||||
class _UserEditPageState extends State<UserEditPage> {
|
||||
bool _isLoading = false;
|
||||
TextEditingController nameCtl;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
nameCtl = new TextEditingController();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return LocalProgress(
|
||||
inAsyncCall: _isLoading,
|
||||
child: new Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: primaryColor,
|
||||
),
|
||||
body: _buildBody(context),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildBody(BuildContext context) {
|
||||
return ListView(
|
||||
padding: EdgeInsets.only(top: 5, left: 15, right: 15),
|
||||
children: <Widget>[
|
||||
Container(
|
||||
padding: EdgeInsets.only(top: 40),
|
||||
child: LocalText(
|
||||
context,
|
||||
'user_edit.welcome',
|
||||
fontSize: 21,
|
||||
color: secondaryColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.only(top: 25),
|
||||
child: LocalText(
|
||||
context,
|
||||
'user_edit.name',
|
||||
color: labelColor,
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.only(top: 10, bottom: 10),
|
||||
child: TextFormField(
|
||||
autofocus: true,
|
||||
controller: nameCtl,
|
||||
cursorColor: primaryColor,
|
||||
keyboardType: TextInputType.text,
|
||||
textAlign: TextAlign.left,
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
contentPadding: EdgeInsets.all(8.0),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(12.0)),
|
||||
borderSide: BorderSide(color: Colors.grey[400], width: 1),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(10.0)),
|
||||
borderSide: BorderSide(
|
||||
color: Colors.grey[400],
|
||||
),
|
||||
),
|
||||
),
|
||||
)),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
Container(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
InkWell(
|
||||
onTap: () => _submit(),
|
||||
child: CircleAvatar(
|
||||
minRadius: 25,
|
||||
backgroundColor: primaryColor,
|
||||
child: Icon(
|
||||
FontAwesomeIcons.check,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
_submit() async {}
|
||||
}
|
||||
Reference in New Issue
Block a user