-
Flutter2CodeingTestPrac 2022. 1. 21. 13:46
resource
1.
2.
3.
3.
canva
Hotreload:
statelessWidget
margin,padding , SafeArea()
https://www.udemy.com/course/flutter-bootcamp-with-dart/learn/lecture/14482114#overview
import 'package:flutter/material.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( primarySwatch: Colors.blue, ), home: const MyHomePage(title: 'Flutter Demo Home Page'), ); } } class MyHomePage extends StatefulWidget { const MyHomePage({Key? key, required this.title}) : super(key: key); final String title; @override State<MyHomePage> createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { int _counter = 0; void _incrementCounter() { setState(() { _counter++; }); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(widget.title), ), body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ const Text( 'You have pushed the button this many times:', ), Text( '$_counter', style: Theme.of(context).textTheme.headline4, ), ], ), ), floatingActionButton: FloatingActionButton( onPressed: _incrementCounter, tooltip: 'Increment', child: const Icon(Icons.add), ), ); } }
# 화면 사이드바 -> drawer 위젯 , default setting을 풀어 줘야 한다 .
# 화면 이동을 위한
onPressed
import 'login_screen.dart';
Padding( padding: EdgeInsets.symmetric(vertical: 16.0), child: Material( elevation: 5.0, color: Colors.lightBlueAccent, borderRadius: BorderRadius.circular(30.0), child: MaterialButton( onPressed: () { //Go to login screen. Navigator.pushNamed(context,LoginScreen.id); }, minWidth: 200.0, height: 42.0, child: Text( 'Log In', ), ), ), ),
파이어 베이스 리얼 타입 : json
cloudfirestore : NOSQL
1.flutter - firebsse - spring
2. flutter - spring
app bar when ressed action button open drawer
Widget build(BuildContext context) { return Scaffold( appBar: AppBar( automaticallyImplyLeading: false,// for custom icon option setting down below title: Image.asset('GDSCLOGO.jpg'), actions: [ IconButton( onPressed: () => Navigator.of(context) .push(MaterialPageRoute(builder: (_) => Search_Screen())), icon: Icon(Icons.search)) ], leading: IconButton( icon: Icon(Icons.person_rounded), onPressed: () =>Scaffold.of(context).openDrawer(), ),
[Flutter] AppBar에 Title, leading icon, actions icon 붙이기
출처: https://fenderist.tistory.com/117 [Devman]자료 : sns 어플 만들기
https://100sucoding.tistory.com/23?category=945334/
아마,, 구독하기 버튼용 :
https://pythonkim.tistory.com/114/
onTap(). : other widget
onPressed() : just button
Inkwell :
컨테이너와 같이 별도의 제스쳐 기능을 제공하지 않는 위젯에 제스쳐 기능을 추가하고자 할 때 InkWell 위젯을 이용할 수 있다.
화면 상단 뒤로 가기 : 네비게이션 클라스 이용
'CodeingTestPrac' 카테고리의 다른 글
2월 9일 (0) 2022.02.09 2월 1일 -Flutter,Flash app ,Class, navigation button, Heroaction (0) 2022.02.01 1월 31일-Flutter 4 /json 파싱 (0) 2022.01.31 1월 28일 -Flutter 3 (0) 2022.01.29 Flutter 1 (0) 2022.01.20