-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
1fc1603
commit 22447e1
Showing
7 changed files
with
148 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:secret_dms/constants/app_colors.dart'; | ||
import 'package:secret_dms/themes/text_styles.dart'; | ||
import 'package:secret_dms/ui/common/circular_gradient_container.dart'; | ||
|
||
/// [BaseBackground] widget is a basic stack widget with some customization to fit the needs of design. It's children can have all the properties of [Stack]. | ||
class BaseBackground extends StatelessWidget { | ||
const BaseBackground({Key? key, required this.children}) : super(key: key); | ||
|
||
/// children is a [List<Widget>] and it is under a [Stack] widget so it can be positioned by wrapping a [Widget] in [Positioned] widget. | ||
final List<Widget> children; | ||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
decoration: const BoxDecoration( | ||
color: AppColors.primaryColor, | ||
), | ||
child: Stack( | ||
fit: StackFit.expand, | ||
children: [ | ||
Positioned( | ||
top: -100.adjustSize, | ||
left: -100.adjustSize, | ||
child: CircularGradientContainer( | ||
radius: 250.adjustSize, | ||
color: AppColors.aqua10.withOpacity(.04), | ||
), | ||
), | ||
Positioned( | ||
bottom: 30.adjustSize, | ||
right: -100.adjustSize, | ||
child: CircularGradientContainer( | ||
radius: 200.adjustSize, | ||
color: AppColors.pink15.withOpacity(0.12), | ||
), | ||
), | ||
...children, | ||
], | ||
), | ||
); | ||
} | ||
} |
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,31 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:secret_dms/themes/text_styles.dart'; | ||
|
||
class CircularGradientContainer extends StatelessWidget { | ||
const CircularGradientContainer({ | ||
required this.radius, | ||
required this.color, | ||
Key? key, | ||
}) : super(key: key); | ||
|
||
final double radius; | ||
final Color color; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
height: radius, | ||
width: radius, | ||
decoration: BoxDecoration( | ||
shape: BoxShape.circle, | ||
boxShadow: [ | ||
BoxShadow( | ||
color: color, | ||
blurRadius: 100.adjustSize, | ||
spreadRadius: radius, | ||
) | ||
], | ||
), | ||
); | ||
} | ||
} |
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,34 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:secret_dms/constants/app_colors.dart'; | ||
import 'package:secret_dms/themes/app_dimensions.dart'; | ||
import 'package:secret_dms/themes/text_styles.dart'; | ||
|
||
class ShhButton extends StatelessWidget { | ||
const ShhButton({ | ||
required this.onPressed, | ||
required this.text, | ||
this.width, | ||
this.height, | ||
Key? key, | ||
}) : super(key: key); | ||
|
||
final Function() onPressed; | ||
final String text; | ||
final double? width; | ||
final double? height; | ||
@override | ||
Widget build(BuildContext context) { | ||
return MaterialButton( | ||
padding: EdgeInsets.symmetric( | ||
vertical: height ?? largeValue, | ||
horizontal: width ?? largeValue, | ||
), | ||
color: AppColors.white, | ||
onPressed: onPressed, | ||
child: Text( | ||
text, | ||
style: AppTextStyles.p3, | ||
), | ||
); | ||
} | ||
} |
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