kashi_ui 1.5.0
kashi_ui: ^1.5.0 copied to clipboard
Cupertino design tokens, theme and primitives for kashi apps, with Button, IconButton, ActionMenu, TextField, Select, RadioGroup, Checkbox, Switch, Card, Badge, Alert.
kashi_ui example #
Apply the theme at the app root, then use the K-widgets anywhere below it.
import 'package:flutter/cupertino.dart';
import 'package:kashi_ui/kashi_ui.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return CupertinoApp(
theme: kashiCupertinoTheme(),
home: const HomeScreen(),
);
}
}
class HomeScreen extends StatelessWidget {
const HomeScreen({super.key});
@override
Widget build(BuildContext context) {
return CupertinoPageScaffold(
navigationBar: const CupertinoNavigationBar(middle: Text('Posts')),
child: SafeArea(
child: Padding(
padding: const EdgeInsets.all(KSpace.s4),
child: KButton(
label: 'Publish post',
onPressed: () {},
variant: KButtonVariant.primary,
),
),
),
);
}
}