반응형
- 코드 예시
import 'dart:math';
import 'package:flutter/material.dart';
class ExamplePage extends StatefulWidget {
const ExamplePage({Key? key}) : super(key: key);
@override
State<ExamplePage> createState() => _ExamplePageState();
}
class _ExamplePageState extends State<ExamplePage> {
int number = Random().nextInt(100); // 0 ~ 99 랜덤
Widget build(BuildContext context) {
return Scaffold();
}
}
반응형