-
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.
Chore: uiUpdate has been merged and tested locally
- Loading branch information
1 parent
3fafd61
commit 4787844
Showing
8 changed files
with
392 additions
and
84 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:shimmer/shimmer.dart'; | ||
|
||
class ShimmerContainer extends StatelessWidget { | ||
final double? width; | ||
final double? height; | ||
final double? borderRadius; | ||
final EdgeInsetsGeometry? margin; | ||
final Color? baseColor; | ||
final Color? highlightColor; | ||
final BoxShape shape; | ||
|
||
const ShimmerContainer({ | ||
super.key, | ||
this.width, | ||
this.height, | ||
this.borderRadius, | ||
this.margin, | ||
this.baseColor, | ||
this.highlightColor, | ||
this.shape = BoxShape.rectangle, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Shimmer.fromColors( | ||
baseColor: baseColor ?? Colors.grey.shade100, // Default base color | ||
highlightColor: | ||
highlightColor ?? Colors.grey.shade200, // Default highlight color | ||
child: Container( | ||
width: width ?? double.infinity, // Default width (full width) | ||
height: height ?? 100.0, // Default height | ||
margin: margin ?? const EdgeInsets.all(8.0), // Default margin | ||
decoration: BoxDecoration( | ||
color: Colors.grey, // Background color of the container | ||
borderRadius: shape == BoxShape.rectangle | ||
? BorderRadius.circular(borderRadius ?? 8.0) | ||
: null, // Optional rounded corners | ||
shape: shape, // Allow for circular or rectangular shape | ||
), | ||
), | ||
); | ||
} | ||
} |
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,90 @@ | ||
//import 'package:flutter/cupertino.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:mess_mgmt/Global/widgets/custom_shimmer_container'; | ||
|
||
class ShimmerListTile extends StatelessWidget { | ||
const ShimmerListTile({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Card( | ||
child: Row( | ||
children: [ | ||
Container( | ||
height: 120, | ||
padding: const EdgeInsets.fromLTRB(14, 8, 14, 8), | ||
decoration: BoxDecoration( | ||
color: const Color.fromARGB(255, 224, 216, 216), | ||
borderRadius: BorderRadius.circular(12)), | ||
child: const Center( | ||
child: ShimmerContainer( | ||
height: 110, | ||
width: 25, | ||
), | ||
)), | ||
const SizedBox(width: 2), | ||
Expanded( | ||
child: Container( | ||
height: 120, | ||
padding: const EdgeInsets.fromLTRB(14, 10, 14, 10), | ||
decoration: BoxDecoration( | ||
color: const Color.fromARGB(255, 224, 216, 216), | ||
borderRadius: BorderRadius.circular(12)), | ||
child: const Row( | ||
mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
children: [ | ||
Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
ShimmerContainer( | ||
width: 170, | ||
height: 30, | ||
margin: EdgeInsets.all(0), | ||
), | ||
ShimmerContainer( | ||
width: 170, | ||
height: 18, | ||
margin: EdgeInsets.fromLTRB(1, 6, 0, 6), | ||
), | ||
Row( | ||
mainAxisAlignment: MainAxisAlignment.start, | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
ShimmerContainer( | ||
width: 35, | ||
height: 35, | ||
margin: EdgeInsets.all(2), | ||
), | ||
SizedBox( | ||
width: 10, | ||
), | ||
ShimmerContainer( | ||
width: 35, | ||
height: 35, | ||
margin: EdgeInsets.all(2), | ||
) | ||
], | ||
), | ||
], | ||
), | ||
Column( | ||
crossAxisAlignment: CrossAxisAlignment.end, | ||
children: [ | ||
ShimmerContainer( | ||
height: 36, | ||
width: 80, | ||
), | ||
ShimmerContainer( | ||
height: 32, | ||
width: 32, | ||
) | ||
], | ||
), | ||
], | ||
), | ||
)), | ||
], | ||
), | ||
); | ||
} | ||
} |
Oops, something went wrong.