0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Flutter画面遷移

Last updated at Posted at 2025-01-19

初投稿になります。

今後Flutter学習をしていくためにここに残します。

libから新たなページを作成し、

class NextPage extends StatelessWidget(material.dartが好ましい) {}

そうするとNextPageに赤波線が入るので create 1 missing override(s) を選択
そこからbody内に構築

main.dartにて、、

公式ドキュメントにあるコードを書き込む

body: Center(
        child: ElevatedButton(
          child: Text('次へ'),
          onPressed: () {
            // ここにボタン呼び出し用コードを書く
            Navigator.push(
              context,
              MaterialPageRoute(builder: (context) => NextPage()),
            );
          },
        ),
      ),

これで完成するはずです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?