flutter 入门-重构

import 'package:flutter/material.dart';

void main() => runApp(MyApp()) ; 

class MyApp extends StatelessWidget{
  @override
  Widget build(BuildContext context){
      return MaterialApp(
        home: MyWidget()
      ) ;
  }
}

class MyWidget extends StatelessWidget {
  // const MyWidget({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
          body: Center(
              child: Text("Hello ,geo",
              style: TextStyle(
                fontSize: 20.0 ,
                fontWeight: FontWeight.bold ,
                fontFamily: 'OdibeeSans'
              ),
              ),
            ),
            floatingActionButton: FloatingActionButton(
              child : Text("button") , onPressed: (){
                print('geo') ; 
              }),
          ) ;
  }
}