|
|
|
@ -26,11 +26,16 @@ class _ChatHomeState extends State<ChatHome> {
|
|
|
|
PageController controller = PageController();
|
|
|
|
PageController controller = PageController();
|
|
|
|
late ChatProviderModel data;
|
|
|
|
late ChatProviderModel data;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
|
|
void dispose() {
|
|
|
|
|
|
|
|
data.clearAll();
|
|
|
|
|
|
|
|
super.dispose();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
data = Provider.of<ChatProviderModel>(context, listen: false);
|
|
|
|
data = Provider.of<ChatProviderModel>(context, listen: false);
|
|
|
|
data.getUserAutoLoginToken().then((value){
|
|
|
|
data.getUserAutoLoginToken().then((value) {
|
|
|
|
data.getUserRecentChats();
|
|
|
|
data.getUserRecentChats();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
return Scaffold(
|
|
|
|
return Scaffold(
|
|
|
|
@ -41,7 +46,7 @@ class _ChatHomeState extends State<ChatHome> {
|
|
|
|
showHomeButton: true,
|
|
|
|
showHomeButton: true,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
body: Column(
|
|
|
|
body: Column(
|
|
|
|
children: [
|
|
|
|
children: <Widget>[
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
padding: const EdgeInsets.only(left: 21, right: 21, top: 16, bottom: 16),
|
|
|
|
padding: const EdgeInsets.only(left: 21, right: 21, top: 16, bottom: 16),
|
|
|
|
decoration: const BoxDecoration(
|
|
|
|
decoration: const BoxDecoration(
|
|
|
|
@ -60,12 +65,7 @@ class _ChatHomeState extends State<ChatHome> {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
children: [myTab(LocaleKeys.mychats.tr(), 0), myTab(LocaleKeys.favorite.tr(), 1)],
|
|
|
|
myTab(LocaleKeys.mychats.tr(), 0),
|
|
|
|
|
|
|
|
myTab(
|
|
|
|
|
|
|
|
LocaleKeys.favorite.tr(),
|
|
|
|
|
|
|
|
1)
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PageView(
|
|
|
|
PageView(
|
|
|
|
@ -76,7 +76,7 @@ class _ChatHomeState extends State<ChatHome> {
|
|
|
|
tabIndex = pageIndex;
|
|
|
|
tabIndex = pageIndex;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
children: [ChatHomeScreen(), ChatFavoriteUsersScreen()],
|
|
|
|
children: <Widget>[ChatHomeScreen(), ChatFavoriteUsersScreen()],
|
|
|
|
).expanded,
|
|
|
|
).expanded,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|