Skip to content

Instantly share code, notes, and snippets.

@chimon2000
Last active February 9, 2022 19:52
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
state_example: app widget
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
void main() {
runApp(App());
}
class App extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ProviderScope(
child: MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: SomePage(), //This is where our page will go,
),
);
}
}
class SomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return const Scaffold();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment