Skip to content

Instantly share code, notes, and snippets.

View FelipeSantos75's full-sized avatar
🥊
Treinando

FELIPE SANTOS FelipeSantos75

🥊
Treinando
  • Brazil
View GitHub Profile
@FelipeSantos75
FelipeSantos75 / glass.dart
Last active January 25, 2022 12:48
glass
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,
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,
required this.start,
required this.end,
})
Form(
key: _form,
child: GlassMorphism(
start: 0.9,
end: 0.6,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Padding(
padding: EdgeInsets.all(8.0),
child: Container(
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
Colors.white.withOpacity(start),
Colors.white.withOpacity(end),
],
begin: AlignmentDirectional.topStart,
end: AlignmentDirectional.bottomEnd,
),
borderRadius: BorderRadius.all(Radius.circular(10)),
border: Border.all(
width: 1.5,
color: Colors.white.withOpacity(0.2),
),