|
|
|
@ -103,17 +103,29 @@ class _SettingsState extends State<Settings> {
|
|
|
|
|
if (mounted) setState(() => profile = p);
|
|
|
|
|
});
|
|
|
|
|
return Scaffold(
|
|
|
|
|
appBar: AppBar(
|
|
|
|
|
title: Text(I18n.of(context).settings),
|
|
|
|
|
),
|
|
|
|
|
body: ListView(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
ContentBanner(
|
|
|
|
|
body: NestedScrollView(
|
|
|
|
|
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) =>
|
|
|
|
|
<Widget>[
|
|
|
|
|
SliverAppBar(
|
|
|
|
|
expandedHeight: 300.0,
|
|
|
|
|
floating: true,
|
|
|
|
|
pinned: true,
|
|
|
|
|
backgroundColor: Theme.of(context).appBarTheme.color,
|
|
|
|
|
flexibleSpace: FlexibleSpaceBar(
|
|
|
|
|
title: Text(I18n.of(context).settings,
|
|
|
|
|
style: TextStyle(color: Colors.black)),
|
|
|
|
|
background: ContentBanner(
|
|
|
|
|
profile?.avatarUrl ?? MxContent(""),
|
|
|
|
|
height: 300,
|
|
|
|
|
defaultIcon: Icons.account_circle,
|
|
|
|
|
loading: profile == null,
|
|
|
|
|
onEdit: kIsWeb ? null : () => setAvatarAction(context),
|
|
|
|
|
onEdit: () => setAvatarAction(context),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
body: ListView(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
ListTile(
|
|
|
|
|
title: Text(
|
|
|
|
|
I18n.of(context).account,
|
|
|
|
@ -188,11 +200,12 @@ class _SettingsState extends State<Settings> {
|
|
|
|
|
ListTile(
|
|
|
|
|
leading: Icon(Icons.code),
|
|
|
|
|
title: Text(I18n.of(context).sourceCode),
|
|
|
|
|
onTap: () =>
|
|
|
|
|
launch("https://gitlab.com/ChristianPauly/fluffychat-flutter"),
|
|
|
|
|
onTap: () => launch(
|
|
|
|
|
"https://gitlab.com/ChristianPauly/fluffychat-flutter"),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|