Group View erstellt #22
@@ -21,11 +21,11 @@ class _GroupsViewState extends State<GroupsView> {
|
|||||||
|
|
||||||
final player = Player(id: 'p1', name: 'Sample');
|
final player = Player(id: 'p1', name: 'Sample');
|
||||||
late final List<Group> skeletonData = List.filled(
|
late final List<Group> skeletonData = List.filled(
|
||||||
8,
|
7,
|
||||||
Group(
|
Group(
|
||||||
id: '0',
|
id: '0',
|
||||||
name: 'Sample Game',
|
name: 'Sample Game',
|
||||||
members: [player, player, player, player],
|
members: [player, player, player, player, player, player],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -68,16 +68,17 @@ class _GroupsViewState extends State<GroupsView> {
|
|||||||
}
|
}
|
||||||
final bool isLoading =
|
final bool isLoading =
|
||||||
snapshot.connectionState == ConnectionState.waiting;
|
snapshot.connectionState == ConnectionState.waiting;
|
||||||
final List<Group> groups = isLoading
|
final List<Group> groups = skeletonData;
|
||||||
? skeletonData
|
//final List<Group> groups = isLoading
|
||||||
: (snapshot.data ?? []);
|
// ? skeletonData
|
||||||
|
// : (snapshot.data ?? []);
|
||||||
return Skeletonizer(
|
return Skeletonizer(
|
||||||
effect: PulseEffect(
|
effect: PulseEffect(
|
||||||
from: Colors.grey[800]!,
|
from: Colors.grey[800]!,
|
||||||
to: Colors.grey[600]!,
|
to: Colors.grey[600]!,
|
||||||
duration: const Duration(milliseconds: 800),
|
duration: const Duration(milliseconds: 800),
|
||||||
),
|
),
|
||||||
enabled: isLoading,
|
enabled: true,
|
||||||
enableSwitchAnimation: true,
|
enableSwitchAnimation: true,
|
||||||
switchAnimationConfig: const SwitchAnimationConfig(
|
switchAnimationConfig: const SwitchAnimationConfig(
|
||||||
duration: Duration(milliseconds: 200),
|
duration: Duration(milliseconds: 200),
|
||||||
|
|||||||
Reference in New Issue
Block a user