sue
  • [The Complete Flutter Development Bootcamp with Dart] 3 MiCard
    2024년 01월 05일 23시 49분 14초에 업로드 된 글입니다.
    작성자: sue24

    how to clone git with git repo's https clone

    1. android studio-check out project from version control

    2. Git

    3. Url(git repo's https clone)

    4. Directory(where you will install the project)

    5. Clone

    6. check out from version control alert - NO

    7. open an existing android studio project - open(directory that you've set on No.4)

    8. there will be an error when you open it => lib/main.dart - get dependencies

     

    hot reload: ⚡

    +) command + s will trigger hot reload, too

    +) hot reload won't loose the state

     

    SafeArea widget ensures the contents will be displayed under the notch

    void main() {
      runApp{
      	MyApp()
      }
    }
    
    class myApp extends StatelessWidget{
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
        	home: Scaffold(
            	body: SafeArea(
                    child: Container(
                        height: 100.0, // 100px
                        width: 100.0,
                        color: Colors.white,
                        child: Text('Hello'),
                        margin: EdgeInsets.all(20.0),
                    )
              	)
            )
        )
      }
    }

     

    right click on a widget - show context actions - wrap with new widget

     

    margin setting

    padding also could be set in same way

    1. EdgeInsets.all(20.0): all four direction

    2. EdgeInsets.symmetric(vertical: 50.0, horizontal: 50.0): not both of the properties are needed

    3. EdgeInsets.fromLTRB(30.0, 10.0, 50.0, 20.0): left, top, right, bottom

    4. EdgeInsets.only(left: 30.0): specify the direction you want to set margin

     

    댓글