|
@@ -1,6 +1,7 @@
|
|
|
import 'package:azlistview/azlistview.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_easyrefresh/easy_refresh.dart';
|
|
|
import 'package:sport/bean/login.dart';
|
|
@@ -61,7 +62,7 @@ class _PageState extends State<UserFriendPage> {
|
|
|
length: 3,
|
|
|
child: Scaffold(
|
|
|
backgroundColor: Colors.white,
|
|
|
- body: NestedScrollView(
|
|
|
+ body: extended.NestedScrollView(
|
|
|
pinnedHeaderSliverHeightBuilder: () {
|
|
|
return pinnedHeaderHeight;
|
|
|
},
|
|
@@ -221,48 +222,56 @@ class _PageDetailState
|
|
|
? Column(
|
|
|
children: <Widget>[
|
|
|
_searchWidget(context),
|
|
|
- Space(
|
|
|
- height: 16.0,
|
|
|
- ),
|
|
|
+ if (!isSeach)
|
|
|
+ Space(
|
|
|
+ height: 16.0,
|
|
|
+ ),
|
|
|
isSeach
|
|
|
? model.items.length > 0
|
|
|
? 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),
|
|
|
- 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({
|
|
|
- "id":
|
|
|
+ "id":
|
|
|
"${model.items[index].user.uid}"
|
|
|
- })));
|
|
|
- },
|
|
|
- ),
|
|
|
- title:
|
|
|
+ })));
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ title:
|
|
|
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,
|
|
|
),
|
|
@@ -462,7 +471,11 @@ class _PageDetailState
|
|
|
)
|
|
|
: TextSpan(
|
|
|
text: '通过扫码',
|
|
|
- style: Theme.of(context).textTheme.bodyText1,
|
|
|
+ style: Theme.of(context)
|
|
|
+ .textTheme
|
|
|
+ .bodyText1
|
|
|
+ .copyWith(
|
|
|
+ color: Theme.of(context).accentColor),
|
|
|
),
|
|
|
TextSpan(
|
|
|
text: "关注了你",
|