one_uikit 0.1.5
one_uikit: ^0.1.5 copied to clipboard
A comprehensive Flutter UI Kit with reusable components, icons, and utilities for 1APP project
import 'package:flutter/material.dart';
import 'package:one_uikit/one_uikit.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'One UI Kit Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
useMaterial3: true,
),
home: const MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
const MyHomePage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('One UI Kit Demo'),
),
body: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
ElevatedButton(
onPressed: () {
context.showSnackBar(message: 'Success message!');
},
child: const Text('Show Success SnackBar'),
),
const SizedBox(height: 16),
ElevatedButton(
onPressed: () {
context.showSnackBar(
message: 'Error message!',
isError: true,
);
},
child: const Text('Show Error SnackBar'),
),
const SizedBox(height: 32),
const Text(
'Error Widget Example:',
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
),
const SizedBox(height: 16),
OneError(
error: Exception('This is a sample error'),
stackTrace: StackTrace.current,
),
],
),
),
);
}
}