Membuat Widget Button flutter 3.10

Konten [Tampil]

 



 import 'package:flutter/material.dart';

import 'package:get/get.dart';


void main() {

  runApp(MyApp());

}


class MyApp extends StatefulWidget {

  @override

  _MyAppState createState() => _MyAppState();

}


class _MyAppState extends State<MyApp> {

  @override

  Widget build(BuildContext context) {

    return GetMaterialApp(

      home: Scaffold(

        appBar: AppBar(

          title: Text("Menu Dashboard"),

        ),

        body: SingleChildScrollView(

          child: Center(

            child: Column(

              children: [

                Text("Tekan Tombol"),

                ElevatedButton(

                  onPressed: () {},

                  child: Text("Button 1"),

                ),

                SizedBox(height: 3),

                Text("Tekan Tombol"),

                ElevatedButton(

                  onPressed: () {},

                  child: Text("Button 2"),

                ),

                SizedBox(height: 3),

                Text("Tekan Tombol"),

                ElevatedButton(

                  onPressed: () {},

                  child: Text("Button 3"),

                ),

                SizedBox(height: 3),

                Text("Tekan Tombol"),

                ElevatedButton(

                  onPressed: () {},

                  child: Text("Button 2"),

                ),

                SizedBox(height: 3),

                Text("Tekan Tombol"),

                ElevatedButton(

                  onPressed: () {},

                  child: Text("Button 2"),

                ),

                SizedBox(height: 3),

                Text("Tekan Tombol"),

                ElevatedButton(

                  onPressed: () {},

                  child: Text("Button 2"),

                ),

                SizedBox(height: 3),

                Text("Tekan Tombol"),

                ElevatedButton(

                  onPressed: () {},

                  child: Text("Button 2"),

                ),

                SizedBox(height: 3),

                Text("Tekan Tombol"),

                ElevatedButton(

                  onPressed: () {},

                  child: Text("Button 2"),

                ),

                SizedBox(height: 3),

                Text("Tekan Tombol"),

                ElevatedButton(

                  onPressed: () {},

                  child: Text("Button 2"),

                ),

                SizedBox(height: 3),

                Text("Tekan Tombol"),

                ElevatedButton(

                  onPressed: () {},

                  child: Text("Button 2"),

                ),

              ],

            ),

          ),

        ),

      ),

    );

  }

}


Previous Post Next Post