|
|
|
@ -17,6 +17,7 @@ import 'package:esse/global.dart';
@@ -17,6 +17,7 @@ import 'package:esse/global.dart';
|
|
|
|
|
import 'package:esse/provider.dart'; |
|
|
|
|
|
|
|
|
|
import 'package:esse/apps/chat/models.dart'; |
|
|
|
|
import 'package:esse/apps/chat/list.dart'; |
|
|
|
|
import 'package:esse/apps/chat/provider.dart'; |
|
|
|
|
|
|
|
|
|
class ChatAddPage extends StatefulWidget { |
|
|
|
@ -31,7 +32,6 @@ class ChatAddPage extends StatefulWidget {
@@ -31,7 +32,6 @@ class ChatAddPage extends StatefulWidget {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class _ChatAddPageState extends State<ChatAddPage> { |
|
|
|
|
final _formKey = GlobalKey<FormState>(); |
|
|
|
|
TextEditingController userIdEditingController = TextEditingController(); |
|
|
|
|
TextEditingController addrEditingController = TextEditingController(); |
|
|
|
|
TextEditingController remarkEditingController = TextEditingController(); |
|
|
|
@ -115,27 +115,21 @@ class _ChatAddPageState extends State<ChatAddPage> {
@@ -115,27 +115,21 @@ class _ChatAddPageState extends State<ChatAddPage> {
|
|
|
|
|
final requestKeys = requests.keys.toList().reversed.toList(); // it had sorted. |
|
|
|
|
|
|
|
|
|
return Scaffold( |
|
|
|
|
body: SafeArea( |
|
|
|
|
child: Padding( |
|
|
|
|
padding: const EdgeInsets.all(10.0), |
|
|
|
|
child: Column(children: <Widget>[ |
|
|
|
|
Row( |
|
|
|
|
children: [ |
|
|
|
|
if (!isDesktop) |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
appBar: AppBar( |
|
|
|
|
title: Text(lang.addFriend), |
|
|
|
|
bottom: PreferredSize( |
|
|
|
|
child: Container(color: const Color(0x40ADB0BB), height: 1.0), |
|
|
|
|
preferredSize: Size.fromHeight(1.0) |
|
|
|
|
), |
|
|
|
|
leading: isDesktop |
|
|
|
|
? IconButton( |
|
|
|
|
onPressed: () { |
|
|
|
|
context.read<ChatProvider>().requestClear(); |
|
|
|
|
Navigator.pop(context); |
|
|
|
|
context.read<AccountProvider>().updateActivedWidget(ChatList()); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
width: 20.0, |
|
|
|
|
child: Icon(Icons.arrow_back, color: color.primary)), |
|
|
|
|
), |
|
|
|
|
SizedBox(width: 15.0), |
|
|
|
|
Expanded( |
|
|
|
|
child: Text(lang.addFriend, |
|
|
|
|
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20.0)), |
|
|
|
|
), |
|
|
|
|
icon: Icon(Icons.arrow_back, color: color.primary), |
|
|
|
|
) : null, |
|
|
|
|
actions: [ |
|
|
|
|
TextButton( |
|
|
|
|
onPressed: () => showShadowDialog( |
|
|
|
|
context, |
|
|
|
@ -146,18 +140,16 @@ class _ChatAddPageState extends State<ChatAddPage> {
@@ -146,18 +140,16 @@ class _ChatAddPageState extends State<ChatAddPage> {
|
|
|
|
|
), |
|
|
|
|
child: Text(lang.myQrcode, style: TextStyle(fontSize: 16.0)), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
] |
|
|
|
|
), |
|
|
|
|
isDesktop ? SizedBox(height: 20.0) : SizedBox(height: 50.0), |
|
|
|
|
Expanded( |
|
|
|
|
body: Container( |
|
|
|
|
padding: const EdgeInsets.all(10.0), |
|
|
|
|
alignment: Alignment.topCenter, |
|
|
|
|
child: SingleChildScrollView( |
|
|
|
|
child: Container( |
|
|
|
|
constraints: BoxConstraints(minWidth: 200, maxWidth: 600), |
|
|
|
|
width: 600, |
|
|
|
|
padding: const EdgeInsets.all(20), |
|
|
|
|
child: Form( |
|
|
|
|
key: _formKey, |
|
|
|
|
child: Column( |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: <Widget>[ |
|
|
|
|
Container( |
|
|
|
|
child: Row( |
|
|
|
@ -217,11 +209,7 @@ class _ChatAddPageState extends State<ChatAddPage> {
@@ -217,11 +209,7 @@ class _ChatAddPageState extends State<ChatAddPage> {
|
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
] |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
)); |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|