forked from bosskmk/pluto_grid
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
136 additions
and
15 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
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
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
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,48 @@ | ||
part of '../../pluto_grid.dart'; | ||
|
||
class PlutoLoadingWidget extends StatelessWidget { | ||
final Color backgroundColor; | ||
final Color indicatorColor; | ||
final String indicatorText; | ||
final double indicatorSize; | ||
|
||
PlutoLoadingWidget({ | ||
this.backgroundColor = Colors.white, | ||
this.indicatorColor = Colors.black, | ||
this.indicatorText = 'Loading...', | ||
this.indicatorSize = 14, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Stack( | ||
children: [ | ||
Positioned.fill( | ||
child: Opacity( | ||
opacity: 0.7, | ||
child: ColoredBox( | ||
color: backgroundColor, | ||
), | ||
), | ||
), | ||
Align( | ||
alignment: Alignment.center, | ||
child: Container( | ||
padding: const EdgeInsets.all(10.0), | ||
decoration: BoxDecoration( | ||
color: backgroundColor, | ||
border: Border.all(color: indicatorColor), | ||
), | ||
child: Text( | ||
indicatorText, | ||
style: TextStyle( | ||
color: indicatorColor, | ||
fontSize: indicatorSize, | ||
), | ||
), | ||
), | ||
), | ||
], | ||
); | ||
} | ||
} |