-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* chore: show digital guide * feat: add loading view * feat: made the shimmer loading visible * chore: fixed automatically * chore: fixed automatically v2 * chore: reusing variables defined in config in loading view * chore: automatical format update * chore: next try to eliminate the errors * chore: next try to eliminate the errors v2 * chore: next try to eliminate the errors v3 * chore: add fvm artifacts and resolve linter
- Loading branch information
Showing
6 changed files
with
183 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
/Users/shark/fvm/versions/stable | ||
/Users/shark/fvm/versions/3.27.4 |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"flutterSdkVersion": "stable" | ||
"flutterSdkVersion": "3.27.4" | ||
} |
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
{ | ||
"flutter": "stable", | ||
"flavors": {} | ||
"flutter": "3.27.4" | ||
} |
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
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
142 changes: 142 additions & 0 deletions
142
lib/features/digital_guide_view/presentation/widgets/digital_guide_loading_view.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,142 @@ | ||
import "package:flutter/material.dart"; | ||
import "../../../../config/ui_config.dart" | ||
show DetailViewsConfig, DigitalGuideConfig, GuideDetailViewConfig; | ||
import "../../../../widgets/loading_widgets/shimmer_loading.dart"; | ||
|
||
class DigitalGuideLoadingView extends StatelessWidget { | ||
const DigitalGuideLoadingView({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return const Shimmer( | ||
linearGradient: shimmerGradient, | ||
child: Column( | ||
children: [ | ||
_DigitalGuideHeaderLoading(), | ||
_DigitalGuideTitleSectionLoading(), | ||
_DigitalGuideInfoSectionLoading(), | ||
Expanded( | ||
child: _DigitalGuideTilesLoading(), | ||
), | ||
], | ||
), | ||
); | ||
} | ||
} | ||
|
||
class _DigitalGuideTitleSectionLoading extends StatelessWidget { | ||
const _DigitalGuideTitleSectionLoading(); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Padding( | ||
padding: const EdgeInsets.only(top: DigitalGuideConfig.borderRadiusBig), | ||
child: Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
ShimmerLoadingItem( | ||
child: Container( | ||
color: Colors.white, | ||
width: 100, | ||
height: DigitalGuideConfig.paddingBig, | ||
), | ||
), | ||
const SizedBox(height: DigitalGuideConfig.paddingSmall), | ||
ShimmerLoadingItem( | ||
child: Container( | ||
color: Colors.white, | ||
width: MediaQuery.of(context).size.width - | ||
2 * DigitalGuideConfig.paddingBig, | ||
height: DigitalGuideConfig.paddingBig, | ||
), | ||
), | ||
], | ||
), | ||
); | ||
} | ||
} | ||
|
||
class _DigitalGuideHeaderLoading extends StatelessWidget { | ||
const _DigitalGuideHeaderLoading(); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return ShimmerLoadingItem( | ||
child: Container( | ||
margin: const EdgeInsets.only(top: DigitalGuideConfig.borderRadiusBig), | ||
decoration: BoxDecoration( | ||
color: Colors.white, | ||
borderRadius: | ||
BorderRadius.circular(GuideDetailViewConfig.borderRadius), | ||
), | ||
width: double.infinity, | ||
height: DetailViewsConfig.imageHeight, | ||
), | ||
); | ||
} | ||
} | ||
|
||
class _DigitalGuideInfoSectionLoading extends StatelessWidget { | ||
const _DigitalGuideInfoSectionLoading(); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Padding( | ||
padding: const EdgeInsets.only(top: DigitalGuideConfig.borderRadiusBig), | ||
child: ShimmerLoadingItem( | ||
child: Container( | ||
color: Colors.white, | ||
width: double.infinity, | ||
height: 180, | ||
), | ||
), | ||
); | ||
} | ||
} | ||
|
||
class _DigitalGuideTilesLoading extends StatelessWidget { | ||
const _DigitalGuideTilesLoading(); | ||
|
||
static const int itemCount = 5; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Padding( | ||
padding: const EdgeInsets.symmetric( | ||
horizontal: DigitalGuideConfig.borderRadiusBig, | ||
), | ||
child: ListView.builder( | ||
physics: const NeverScrollableScrollPhysics(), | ||
shrinkWrap: true, | ||
itemCount: itemCount, | ||
itemBuilder: (context, index) { | ||
return const Padding( | ||
padding: EdgeInsets.symmetric( | ||
vertical: GuideDetailViewConfig.paddingMedium, | ||
), | ||
child: _LoadingTile(), | ||
); | ||
}, | ||
), | ||
); | ||
} | ||
} | ||
|
||
class _LoadingTile extends StatelessWidget { | ||
const _LoadingTile(); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return ShimmerLoadingItem( | ||
child: Container( | ||
decoration: BoxDecoration( | ||
color: Colors.white, | ||
borderRadius: | ||
BorderRadius.circular(GuideDetailViewConfig.borderRadius), | ||
), | ||
width: double.infinity, | ||
height: DigitalGuideConfig.photoRowHeight, | ||
), | ||
); | ||
} | ||
} |