katana_form 1.0.0 copy "katana_form: ^1.0.0" to clipboard
katana_form: ^1.0.0 copied to clipboard

outdated

Package to provide FormController to define the use of forms and FormStyle to unify the look and feel of forms.

example/lib/main.dart

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

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

final appRef = AppRef();

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

  @override
  Widget build(BuildContext context) {
    return AppScoped(
      appRef: appRef,
      child: MaterialApp(
        home: const CounterPage(),
        title: "Flutter Demo",
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
      ),
    );
  }
}

class CounterPage extends PageScopedWidget {
  const CounterPage({super.key});

  @override
  Widget build(BuildContext context, PageRef ref) {
    final counter = ref.page.watch(() => ValueNotifier(0));

    return Scaffold(
      appBar: AppBar(title: const Text("App Demo")),
      body: Center(
        child: Text("${counter.value}"),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () {
          counter.value++;
        },
        child: const Icon(Icons.add),
      ),
    );
  }
}
1
likes
0
pub points
41%
popularity

Publisher

verified publishermathru.net

Package to provide FormController to define the use of forms and FormStyle to unify the look and feel of forms.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_picker, katana

More

Packages that depend on katana_form