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
import 'dart:ui'; | |
import 'package:flutter/material.dart'; | |
class GlassMorphism extends StatelessWidget { | |
final Widget child; | |
final double start; | |
final double end; | |
const GlassMorphism({ | |
Key? key, | |
required this.child, |
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
import 'dart:ui'; | |
import 'package:flutter/material.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
class GlassMorphism extends StatelessWidget { | |
final Widget child; | |
final double start; | |
final double end; | |
const GlassMorphism({ | |
Key? key, | |
required this.child, | |
required this.start, | |
required this.end, | |
}) |
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
Form( | |
key: _form, | |
child: GlassMorphism( | |
start: 0.9, | |
end: 0.6, | |
child: Column( | |
mainAxisSize: MainAxisSize.min, | |
children: [ | |
Padding( | |
padding: EdgeInsets.all(8.0), |
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
child: Container( | |
decoration: BoxDecoration( | |
gradient: LinearGradient( | |
colors: [ | |
Colors.white.withOpacity(start), | |
Colors.white.withOpacity(end), | |
], | |
begin: AlignmentDirectional.topStart, | |
end: AlignmentDirectional.bottomEnd, | |
), |
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
borderRadius: BorderRadius.all(Radius.circular(10)), | |
border: Border.all( | |
width: 1.5, | |
color: Colors.white.withOpacity(0.2), | |
), |