Nano Core

Pub Version License: MIT Status: Stable

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 ChangeNotifier and ListenableBuilder.
  • 🛠️ NanoCommand & NanoCommandBuilder: Encapsulated async commands for user actions and operations.
  • 🧩 Design System Components: Standalone reusable UI widgets such as NanoLoadingOverlay and NanoToast.
  • 💉 NanoInjections & NanoStatePage: Dependency injection scoping with GetIt and 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.

Libraries

nano_core
Nano Core is a lightweight, reactive architecture framework and design system toolkit for Flutter multiplatform applications.