knt_bloc 4.1.1 knt_bloc: ^4.1.1 copied to clipboard
A handy bloc base for future Appixi's apps
import 'package:flutter/material.dart';
import 'page/main_page.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'KntBloc Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const SplashPage(),
);
}
}
class SplashPage extends StatelessWidget {
const SplashPage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Splash Page'),
),
floatingActionButton: FloatingActionButton(
onPressed: () {
Navigator.of(context).push(MaterialPageRoute(
builder: (context) => const MainPage(),
));
},
backgroundColor: Colors.orange,
child: const Icon(
Icons.play_arrow_rounded,
color: Colors.white,
size: 24,
),
),
);
}
}