grock 0.1.1+3 grock: ^0.1.1+3 copied to clipboard
Snackbar, Toast, No Context Extension, Custom Widgets, Widget Extensions, Fast Tools, IOS Style Widget and Tools.
import 'package:flutter/material.dart';
import 'package:grock/grock.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
/// added this line
navigatorKey: Grock.navigationKey,
scaffoldMessengerKey: Grock.scaffoldMessengerKey,
title: 'Material App',
home: const Home(),
);
}
}
class Home extends StatefulWidget {
const Home({super.key});
@override
State<Home> createState() => _HomeState();
}
class _HomeState extends State<Home> {
@override
Widget build(BuildContext context) {
return const Scaffold(
body: Center(child: Text("Grock"),),
);
}
}