nano_core 0.0.4
nano_core: ^0.0.4 copied to clipboard
A lightweight reactive architecture framework and design system toolkit for Flutter multiplatform applications.
Nano Core #
A lightweight reactive architecture framework and design system toolkit for Flutter multiplatform applications.
Features #
- 🚀 NanoScaffold: Reactive base page scaffold supporting Web/Desktop headers, mobile AppBars, loading overlays, and error/warning/success toasts.
- ⚡ NanoController & NanoState: Clean, reactive state management built on
ChangeNotifierandListenableBuilder. - 🛠️ NanoCommand & NanoCommandBuilder: Encapsulated async commands for user actions and operations.
- 🧩 Design System Components: Standalone reusable UI widgets such as
NanoLoadingOverlayandNanoToast. - 💉 NanoInjections & NanoStatePage: Dependency injection scoping with
GetItand page lifecycle binding. - 🖥️ NanoDeviceType: Real-time cross-platform environment and responsive viewport width inspection.
Getting Started #
Add nano_core to your pubspec.yaml:
dependencies:
nano_core: ^0.0.4
Quick Example #
import 'package:flutter/material.dart';
import 'package:nano_core/nano_core.dart';
class MyController extends NanoController<String> {
Future<void> loadData() async {
execute(() async {
await Future.delayed(const Duration(seconds: 2));
return 'Data loaded successfully!';
});
}
}
class MyPage extends StatelessWidget {
const MyPage({super.key, required this.controller});
final MyController controller;
@override
Widget build(BuildContext context) {
return NanoScaffold(
controller: controller,
header: AppBar(title: const Text('Nano Core Example')),
builder: (context, child) {
return Center(
child: Text(controller.state.data ?? 'No data'),
);
},
);
}
}
License #
This project is licensed under the MIT License - see the LICENSE file for details.