import
'package:flutter/material.dart'
;
import
'package:glassmorphism/glassmorphism.dart'
;
import
'package:google_fonts/google_fonts.dart'
;
class
MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => _MyHomePageState();
}
class
_MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return
Scaffold(
body: Container(
height: MediaQuery.of(context).size.height,
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
gradient: LinearGradient(colors: [
Colors.deepOrangeAccent,
Colors.lightGreenAccent,
], begin: Alignment.topLeft, end: Alignment.bottomRight)),
child: LayoutBuilder(
builder: (context, constraints) {
return
Stack(
children: [
Positioned(
top: constraints.maxHeight * 0.19,
left: constraints.maxWidth * 0.01,
child: Container(
height: constraints.maxHeight * 0.20,
width: constraints.maxWidth * 0.35,
decoration: BoxDecoration(
gradient: RadialGradient(
colors: [
Colors.deepPurpleAccent,
Colors.purple
],
radius: 0.7,
),
shape: BoxShape.circle),
)),
Positioned(
top: constraints.maxHeight * 0.61,
right: constraints.maxWidth * 0.01,
child: Container(
height: constraints.maxHeight * 0.20,
width: constraints.maxWidth * 0.35,
decoration: BoxDecoration(
gradient: RadialGradient(
colors: [
Colors.red.withOpacity(0.6),
Colors.redAccent
],
radius: 0.7,
),
shape: BoxShape.circle),
)),
Center(
child: GlassmorphicContainer(
height: constraints.maxHeight * 0.5,
width: constraints.maxWidth * 0.8,
borderRadius: constraints.maxHeight * 0.02,
blur: 15,
alignment: Alignment.center,
border: 2,
linearGradient: LinearGradient(
colors: [
Colors.white.withOpacity(0.2),
Colors.white38.withOpacity(0.2)
],
begin: Alignment.topLeft,
end: Alignment.bottomRight),
borderGradient: LinearGradient(colors: [
Colors.white24.withOpacity(0.2),
Colors.white70.withOpacity(0.2)
]),
child: Stack(
children: [
Positioned(
top: constraints.maxHeight * 0.025,
right: constraints.maxWidth * 0.05,
child: Container(
height: constraints.maxHeight * 0.5,
width: constraints.maxWidth * 0.70,
child: Image.asset(
'assets/images/gfg_1.png'
),
),
),
Positioned(
top: constraints.maxHeight * 0.010,
right: constraints.maxWidth * 0.05,
child: Container(
height: constraints.maxHeight * 0.23,
width: constraints.maxWidth * 0.60,
child: Image.asset(
'assets/images/technical_scripter.png'
),
),
),
Positioned(
top: constraints.maxHeight * 0.35,
right: constraints.maxWidth * 0.10,
child: Container(
height: constraints.maxHeight * 0.2,
width: constraints.maxWidth * 0.60,
child: FittedBox(
fit: BoxFit.scaleDown,
alignment: Alignment.centerLeft,
child: Text(
"Technical Scripter 2020 Article.1"
,
style: GoogleFonts.montserrat(
textStyle: TextStyle(
color: Colors.white,
letterSpacing: 1,
fontSize: 80,
fontWeight: FontWeight.w700)),
),
),
),
),
],
),
),
),
],
);
},
)));
}
}