magnet 0.0.2 magnet: ^0.0.2 copied to clipboard
A new Flutter package project.
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:magnet/magnet.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Home(),
);
}
}
class Home extends StatelessWidget {
@override
Widget build(BuildContext context) {
ScreenUtil.init(context, width: 414, height: 896, allowFontScaling: true);
return Scaffold(
backgroundColor: Colors.white,
body: SafeArea(
child: Container(
width: MediaQuery.of(context).size.width,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
DashboardCard(
title: "Calendar",
),
SizedBox(height: 20),
CalendarCard(
date: 18.toString(),
// height:
day: "Tue",
),
SizedBox(height: 20),
MagnetPrimaryButton(
title: "Login",
onPressed: () {
print("primary button tapped");
}),
SizedBox(height: 20),
MagnetSecondaryButton(
title: "Secondary",
onPressed: () {
print("secondary button tapped");
}),
],
),
),
),
);
}
}