zerom 0.0.7
zerom: ^0.0.7 copied to clipboard
There is Zerom package for you to write Flutter easier. It allows you to demand a healthier coding.
import 'package:example/route.dart';
import 'package:flutter/material.dart';
import 'package:zerom/zerom.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Zerom',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Zerom'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key, required this.title}) : super(key: key);
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
TextButton(
onPressed: () {
context.next(const RouteExample());
},
child: const Text("Zerom"),
),
Container(
padding: context.paddinglow,
width: context.dynamicWidth(0.1),
height: context.dynamicHeight(0.1),
color: Colors.amber,
child: Text(
"Zerom",
style: context.theme.textTheme.bodyLarge,
),
),
const SizedBox(height: 20),
ZeromButton(
title: "Button",
childApproval: false,
onTap: () {
print("object");
},
width: context.dynamicWidth(0.4),
height: context.dynamicHeight(0.1),
),
const SizedBox(height: 20),
ZeromPasswordInput(
width: context.dynamicWidth(0.6),
height: context.dynamicHeight(0.06),
iconColor: Colors.black,
labelText: "Password",
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(20),
),
fillColor: Colors.lightGreenAccent,
),
],
),
),
);
}
}