mm_nrc_kit 1.0.3 copy "mm_nrc_kit: ^1.0.3" to clipboard
mm_nrc_kit: ^1.0.3 copied to clipboard

Myanmar NRC UI Kit

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:mm_nrc_kit/mm_nrc_kit.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'MM NRC Kit',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        fontFamily: 'SF-Compact-Rounded-Regular',
        appBarTheme: const AppBarTheme(backgroundColor: Colors.white),
        scaffoldBackgroundColor: const Color(0xffEFEEF2),
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'MM NRC Kit'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    FocusScopeNode currentFocus = FocusScope.of(context);
    return GestureDetector(
      onTap: () {
        if (!currentFocus.hasPrimaryFocus) {
          currentFocus.focusedChild?.unfocus();
        }
      },
      child: Scaffold(
        appBar: AppBar(
          title: Text(widget.title),
        ),
        body: Padding(
          padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
          child: NRCField(
            onCompleted: (value) {
              debugPrint("onCompleted : $value");
            },
            onChanged: (value) {
              debugPrint("onChanged : $value");
            },
          ),
        ),
      ),
    );
  }
}
2
likes
120
pub points
37%
popularity

Publisher

unverified uploader

Myanmar NRC UI Kit

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on mm_nrc_kit