glass_card 0.0.1 glass_card: ^0.0.1 copied to clipboard
Plugin flutter with glass cards.
import 'package:flutter/material.dart';
import 'package:glass_card/glass_card.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
backgroundColor: Colors.black,
body: Center(
child: CardGlass(
height: 130,
width: 300,
borderRadius: BorderRadius.all(Radius.circular(16)),
child: Padding(
padding:
const EdgeInsets.symmetric(horizontal: 16.0, vertical: 24),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'Battery 🔋',
style: TextStyle(fontSize: 32, color: Colors.white),
),
Text(
'98%',
style: TextStyle(
fontSize: 32,
fontWeight: FontWeight.w700,
color: Colors.white),
),
],
),
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
'12 hours to fully discharge',
style: TextStyle(fontSize: 18, color: Colors.white),
),
],
)
],
),
),
),
),
),
);
}
}