account display is done!
This commit is contained in:
parent
0f01665ad0
commit
25fb912c7a
|
@ -198,13 +198,15 @@ class _ProfileViewState extends State<ProfileView> {
|
|||
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();
|
||||
|
|
|
@ -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<Thread> createState() => _ThreadState();
|
||||
|
@ -72,6 +77,23 @@ class _ThreadState extends State<Thread> {
|
|||
);
|
||||
}
|
||||
|
||||
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: [
|
||||
|
|
Loading…
Reference in New Issue