Skip to content

Instantly share code, notes, and snippets.

@nabe33
Last active March 23, 2024 08:17
Show Gist options
  • Save nabe33/8fe2a726e77b5bebf4785e3afdb543fd to your computer and use it in GitHub Desktop.
Save nabe33/8fe2a726e77b5bebf4785e3afdb543fd to your computer and use it in GitHub Desktop.
StatefulWidgetの例
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('Your App Title Here'),
),
body: Center(
child: Text('Hello, World!'),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment