app_wrapper 0.1.1 copy "app_wrapper: ^0.1.1" to clipboard
app_wrapper: ^0.1.1 copied to clipboard

outdated

Wrapper entry point the provides app wide dependencies

example/main.dart

import 'package:flutter/material.dart';

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

class AppWrapperExample extends StatefulWidget {
  /// This widget is the root of your application.
  const AppWrapperExample({Key? key}) : super(key: key);

  @override
  _AppWrapperExampleState createState() => _AppWrapperExampleState();
}

class _AppWrapperExampleState extends State<AppWrapperExample> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      /// This call to setState tells the Flutter framework that something has
      /// changed in this State, which causes it to rerun the build method below
      /// so that the display can reflect the updated values. If we changed
      /// _counter without calling setState(), then the build method would not be
      /// called again, and so nothing would appear to happen.
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Debug Logger example'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headline4,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: const Icon(Icons.add),
      ),
    );
  }
}
3
likes
0
pub points
3%
popularity

Publisher

verified publishersavannahghi.org

Wrapper entry point the provides app wide dependencies

Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (LICENSE)

Dependencies

camera, flutter, flutter_graphql_client, local_auth

More

Packages that depend on app_wrapper