|
@@ -1,6 +1,7 @@
|
|
import 'package:azlistview/azlistview.dart';
|
|
import 'package:azlistview/azlistview.dart';
|
|
import 'package:cached_network_image/cached_network_image.dart';
|
|
import 'package:cached_network_image/cached_network_image.dart';
|
|
-import 'package:extended_nested_scroll_view/extended_nested_scroll_view.dart';
|
|
|
|
|
|
+import 'package:extended_nested_scroll_view/extended_nested_scroll_view.dart' as extended;
|
|
|
|
+import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart' hide NestedScrollView;
|
|
import 'package:flutter/material.dart' hide NestedScrollView;
|
|
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
|
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
|
import 'package:sport/bean/login.dart';
|
|
import 'package:sport/bean/login.dart';
|
|
@@ -61,7 +62,7 @@ class _PageState extends State<UserFriendPage> {
|
|
length: 3,
|
|
length: 3,
|
|
child: Scaffold(
|
|
child: Scaffold(
|
|
backgroundColor: Colors.white,
|
|
backgroundColor: Colors.white,
|
|
- body: NestedScrollView(
|
|
|
|
|
|
+ body: extended.NestedScrollView(
|
|
pinnedHeaderSliverHeightBuilder: () {
|
|
pinnedHeaderSliverHeightBuilder: () {
|
|
return pinnedHeaderHeight;
|
|
return pinnedHeaderHeight;
|
|
},
|
|
},
|
|
@@ -221,48 +222,56 @@ class _PageDetailState
|
|
? Column(
|
|
? Column(
|
|
children: <Widget>[
|
|
children: <Widget>[
|
|
_searchWidget(context),
|
|
_searchWidget(context),
|
|
- Space(
|
|
|
|
- height: 16.0,
|
|
|
|
- ),
|
|
|
|
|
|
+ if (!isSeach)
|
|
|
|
+ Space(
|
|
|
|
+ height: 16.0,
|
|
|
|
+ ),
|
|
isSeach
|
|
isSeach
|
|
? model.items.length > 0
|
|
? model.items.length > 0
|
|
? Expanded(
|
|
? Expanded(
|
|
- child: ListView.builder(
|
|
|
|
- itemBuilder: (context, index) => ListTile(
|
|
|
|
- leading: InkWell(
|
|
|
|
- child: Container(
|
|
|
|
- width: 44,
|
|
|
|
- height: 44,
|
|
|
|
- decoration: BoxDecoration(
|
|
|
|
- shape: BoxShape.rectangle,
|
|
|
|
- borderRadius:
|
|
|
|
|
|
+ child:
|
|
|
|
+ ListView.builder(
|
|
|
|
+ padding: EdgeInsets.zero,
|
|
|
|
+ itemBuilder: (context, index) => Column(
|
|
|
|
+ children: <Widget>[
|
|
|
|
+ ListTile(
|
|
|
|
+ leading: InkWell(
|
|
|
|
+ child: Container(
|
|
|
|
+ width: 44,
|
|
|
|
+ height: 44,
|
|
|
|
+ decoration: BoxDecoration(
|
|
|
|
+ shape: BoxShape.rectangle,
|
|
|
|
+ borderRadius:
|
|
BorderRadius.circular(4.0),
|
|
BorderRadius.circular(4.0),
|
|
- image: DecorationImage(
|
|
|
|
- image: CachedNetworkImageProvider(
|
|
|
|
- model.items[index].user.avatar,
|
|
|
|
- )),
|
|
|
|
- ),
|
|
|
|
- ),
|
|
|
|
- onTap: () {
|
|
|
|
- NavigatorUtil.goPage(
|
|
|
|
- context,
|
|
|
|
- (context) => UserDetailPage(
|
|
|
|
|
|
+ image: DecorationImage(
|
|
|
|
+ image: CachedNetworkImageProvider(
|
|
|
|
+ model.items[index].user.avatar,
|
|
|
|
+ )),
|
|
|
|
+ ),
|
|
|
|
+ ),
|
|
|
|
+ onTap: () {
|
|
|
|
+ NavigatorUtil.goPage(
|
|
|
|
+ context,
|
|
|
|
+ (context) => UserDetailPage(
|
|
PostUser.fromJson({
|
|
PostUser.fromJson({
|
|
- "id":
|
|
|
|
|
|
+ "id":
|
|
"${model.items[index].user.uid}"
|
|
"${model.items[index].user.uid}"
|
|
- })));
|
|
|
|
- },
|
|
|
|
- ),
|
|
|
|
- title:
|
|
|
|
|
|
+ })));
|
|
|
|
+ },
|
|
|
|
+ ),
|
|
|
|
+ title:
|
|
Text("${model.items[index].user.name}"),
|
|
Text("${model.items[index].user.name}"),
|
|
- onTap: () {
|
|
|
|
- NavigatorUtil.goPage(
|
|
|
|
- context,
|
|
|
|
- (context) => ChatPage(
|
|
|
|
- UserInfo.fromJson(model
|
|
|
|
- .items[index].user
|
|
|
|
- .toJson())));
|
|
|
|
- },
|
|
|
|
|
|
+ onTap: () {
|
|
|
|
+ NavigatorUtil.goPage(
|
|
|
|
+ context,
|
|
|
|
+ (context) => ChatPage(
|
|
|
|
+ UserInfo.fromJson(model
|
|
|
|
+ .items[index].user
|
|
|
|
+ .toJson())));
|
|
|
|
+ },
|
|
|
|
+ ),
|
|
|
|
+ Divider()
|
|
|
|
+ ],
|
|
),
|
|
),
|
|
itemCount: model.items.length,
|
|
itemCount: model.items.length,
|
|
),
|
|
),
|
|
@@ -462,7 +471,11 @@ class _PageDetailState
|
|
)
|
|
)
|
|
: TextSpan(
|
|
: TextSpan(
|
|
text: '通过扫码',
|
|
text: '通过扫码',
|
|
- style: Theme.of(context).textTheme.bodyText1,
|
|
|
|
|
|
+ style: Theme.of(context)
|
|
|
|
+ .textTheme
|
|
|
|
+ .bodyText1
|
|
|
|
+ .copyWith(
|
|
|
|
+ color: Theme.of(context).accentColor),
|
|
),
|
|
),
|
|
TextSpan(
|
|
TextSpan(
|
|
text: "关注了你",
|
|
text: "关注了你",
|