1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 08:15:16 +00:00

Add friend tab

This commit is contained in:
2021-03-17 17:14:53 +01:00
parent 20e486fe26
commit 160a3e1f27
4 changed files with 41 additions and 8 deletions

View File

@ -20,6 +20,10 @@ import 'package:flutter/material.dart';
enum _ErrorsLevel { NONE, MINOR, MAJOR }
class FriendsListScreen extends StatefulWidget {
final bool showAppBar;
const FriendsListScreen({Key key, this.showAppBar = true}) : super(key: key);
@override
State<StatefulWidget> createState() => _FriendsListScreenState();
}
@ -103,9 +107,11 @@ class _FriendsListScreenState extends SafeState<FriendsListScreen> {
@override
Widget build(BuildContext context) => Scaffold(
appBar: AppBar(
title: Text(tr("Your friends list")),
),
appBar: widget.showAppBar
? AppBar(
title: Text(tr("Your friends list")),
)
: null,
body: _buildBody(),
);

View File

@ -13,11 +13,14 @@ import 'package:flutter/material.dart';
class OtherUserFriendsListScreen extends StatefulWidget {
final int userID;
final bool enableAppBar;
const OtherUserFriendsListScreen({
Key key,
@required this.userID,
this.enableAppBar = true,
}) : assert(userID != null),
assert(enableAppBar != null),
super(key: key);
@override
@ -74,9 +77,11 @@ class _OtherUserFriendsListScreenState
if (_usersInfo == null) return buildCenteredProgressBar();
return Scaffold(
appBar: AppBar(
title: Text(_routeName),
),
appBar: widget.enableAppBar
? AppBar(
title: Text(_routeName),
)
: null,
body: ListView.builder(
itemCount: _friendsList.length,
itemBuilder: (c, i) => SimpleUserTile(