From 25fb912c7a5fbf1eaefddaada36d9472d45a133c Mon Sep 17 00:00:00 2001 From: zoe Date: Mon, 5 Sep 2022 23:09:49 +0200 Subject: [PATCH] account display is done! --- lib/pages/profile_view/profile_view.dart | 6 ++++-- lib/partials/thread.dart | 24 +++++++++++++++++++++++- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/lib/pages/profile_view/profile_view.dart b/lib/pages/profile_view/profile_view.dart index c252eef..fc06b17 100644 --- a/lib/pages/profile_view/profile_view.dart +++ b/lib/pages/profile_view/profile_view.dart @@ -198,13 +198,15 @@ class _ProfileViewState extends State { height: MediaQuery.of(context).size.height * 2 / 3, child: ListView.builder( controller: _scrollController, - shrinkWrap: true, itemCount: threads.length + 2, itemBuilder: (context, index) { if (index == 0) { return profileViewDisplay; } else if (index > 0 && index <= threads.length) { - return Thread(model: threads[index - 1]); + return Thread( + model: threads[index - 1], + constrained: false, + ); } return const LoadingBox(); diff --git a/lib/partials/thread.dart b/lib/partials/thread.dart index 20b9f70..98e71b2 100644 --- a/lib/partials/thread.dart +++ b/lib/partials/thread.dart @@ -5,8 +5,13 @@ import '../business_logic/timeline/timeline.dart' as logic; import '../global.dart' as global; class Thread extends StatefulWidget { - const Thread({required this.model, Key? key}) : super(key: key); + const Thread({ + required this.model, + Key? key, + this.constrained = true, + }) : super(key: key); final logic.ThreadModel model; + final bool constrained; @override State createState() => _ThreadState(); @@ -72,6 +77,23 @@ class _ThreadState extends State { ); } + if (!widget.constrained) { + return Padding( + padding: const EdgeInsets.all(4), + child: Container( + padding: const EdgeInsets.all(24), + decoration: BoxDecoration( + color: Theme.of(context).colorScheme.surface, + border: Border.all(color: Theme.of(context).colorScheme.secondary), + borderRadius: BorderRadius.circular(8), + ), + child: Column( + children: c, + ), + ), + ); + } + return Row( mainAxisAlignment: MainAxisAlignment.center, children: [