-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#128 - implement guide detail view - loading
- Loading branch information
1 parent
58c7264
commit 9e07b05
Showing
3 changed files
with
119 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
lib/features/guide_detail_view/widgets/my_expansion_tile.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import "package:flutter/material.dart"; | ||
|
||
import "../../../config/ui_config.dart"; | ||
import "../../../theme/app_theme.dart"; | ||
import "../../../widgets/loading_widgets/shimmer_loading.dart"; | ||
|
||
class MyExpansionTile extends StatelessWidget { | ||
final String title; | ||
final String description; | ||
|
||
const MyExpansionTile({ | ||
required this.title, | ||
required this.description, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Padding( | ||
padding: const EdgeInsets.symmetric( | ||
horizontal: GuideDetailViewConfig.paddingMedium, | ||
), | ||
child: ExpansionTile( | ||
title: Text(title, style: context.textTheme.title), | ||
backgroundColor: context.colorTheme.greyLight, | ||
collapsedBackgroundColor: context.colorTheme.greyLight, | ||
shape: RoundedRectangleBorder( | ||
borderRadius: | ||
BorderRadius.circular(GuideDetailViewConfig.borderRadius), | ||
), | ||
collapsedShape: RoundedRectangleBorder( | ||
borderRadius: | ||
BorderRadius.circular(GuideDetailViewConfig.borderRadius), | ||
), | ||
iconColor: context.colorTheme.orangePomegranade, | ||
collapsedIconColor: context.colorTheme.orangePomegranade, | ||
children: [ | ||
Padding( | ||
padding: const EdgeInsets.symmetric( | ||
vertical: GuideDetailViewConfig.paddingSmall, | ||
), | ||
child: ListTile( | ||
title: Text( | ||
description, | ||
style: context.textTheme.body.copyWith(fontSize: 14), | ||
), | ||
), | ||
), | ||
], | ||
), | ||
); | ||
} | ||
} | ||
|
||
class MyExpansionTileLoading extends StatelessWidget { | ||
const MyExpansionTileLoading(); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return ShimmerLoadingItem( | ||
child: Container( | ||
decoration: BoxDecoration( | ||
color: Colors.white, | ||
borderRadius: | ||
BorderRadius.circular(GuideDetailViewConfig.borderRadius), | ||
), | ||
width: double.infinity, | ||
height: 45, | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters