INNER CODE UNIT · Dart
AppState
mhmzdev/devfolio · lib/app.dart:20
class AppState extends State<App> {
@override
void initState() {
super.initState();
// Run code depending on the rendering environment.
if (kIsWeb) {
print("Hello client");
// When using @client components there is no default `main()` function on the client where you would normally
// run any client-side initialization logic. Instead you can put it here, considering this component is only
// mounted once at the root of your client-side component tree.
} else {
print("Hello server");
}
}
@override
Iterable<Component> build(BuildContext context) sync* {
// This method is rerun every time the component is rebuilt.