원강민의 Wonhada 블로그

Category

플러터[Flutter]

[Flutter] 웹에서 JSON 데이터 가져오기

pubspec.yaml 12dependencies:   http: 0.11.3+16 main.dart 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667import ‘dart:async’; import ‘dart:convert’; import ‘package:flutter/material.dart’; import ‘package:http/http.dart’ as http; void main() => runApp(MyApp()); class MyApp extends StatefulWidget{   MyAppState createState()=>  MyAppState(); } class MyAppState extends State<MyApp> {   String _txt = "Nothing";  … Continue Reading →

[Flutter] 이미지 사용하기

프로젝트 최상위 폴더에 assets 라는 폴더를 만들고 이미지를 저장합니다. pubspec.yaml 1234flutter:   uses-material-design: true # 이 속성이 정의된 부분 아래에 assets 추가   assets:    – assets/ main.dart 12345678910111213141516171819202122232425262728293031323334import ‘package:flutter/material.dart’; void main() => runApp(MyApp()); class MyApp extends StatelessWidget {  … Continue Reading →

[Flutter] Collapsing Toolbar 샘플

main.dart 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122import ‘package:flutter/material.dart’; void main() => runApp(MainCollapsingToolbar()); class MainCollapsingToolbar extends StatefulWidget {   @override   _MainCollapsingToolbarState createState() => _MainCollapsingToolbarState(); } class _MainCollapsingToolbarState extends State<MainCollapsingToolbar> {   @override   Widget build(BuildContext context) {     return MaterialApp(        … Continue Reading →

[Flutter] SliverAppBar & TabBarView 샘플

main.dart 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121import ‘package:flutter/material.dart’; void main() => runApp(MainApp()); class MainApp extends StatelessWidget {   List buildTextViews(int count) {     List<Widget> strings = List();     for (int i = 0; i < count; i++) {       strings.add(new Padding(… Continue Reading →

[Flutter] 네이티브 메소드 호출 (MethodChannel)

네이티브 코드 수정 후엔 다시 빌드해야 합니다. ‘Hot Reload’로는 적용되지 않습니다. 아래와 같이 결과가 출력됩니다. 12D/flutter (28207): Hello from Dart I/flutter (28207): Hello from Native main.dart 123456789101112131415161718192021222324252627282930313233import ‘dart:async’; import ‘package:flutter/material.dart’; import ‘package:flutter/services.dart’; void main() => runApp(MainApp()); class MainApp extends StatelessWidget… Continue Reading →

[Flutter] 사진 찍기 (ImagePicker 패키지 이용)

플러터 패키지 사이트 – https://pub.dartlang.org/flutter – 이미지 피커: https://pub.dartlang.org/packages/image_picker pubspec.yaml에 추가 123dependencies:  …   image_picker: ^0.4.6 main.dart 123456789101112131415161718192021222324252627282930313233343536373839404142434445import ‘dart:io’; import ‘dart:async’; import ‘package:image_picker/image_picker.dart’; import ‘package:flutter/material.dart’; void main() => runApp(MaterialApp(   home: MyHomePage(), )); class MyHomePage extends StatefulWidget {   @override… Continue Reading →

[Flutter] StatusBar와 Debug 배너 없애기

12345678910import "package:flutter/material.dart"; import ‘package:flutter/services.dart’; void main() {   SystemChrome.setEnabledSystemUIOverlays([]);// StatusBar 숨기기   runApp(MaterialApp(     debugShowCheckedModeBanner: false, // Debug 배너 제거   )); } 버튼을 눌렀을 때 StatusBar 상태를 바꾸려면… 123456bool _statusBarHidden = true; RaisedButton(onPressed: (){   SystemChrome.setEnabledSystemUIOverlays(_statusBarHidden ? SystemUiOverlay.values… Continue Reading →

플러터[Flutter] 시작하기

Mac에 인스톨하기 1. IDE 설치 1.1. Xcode 설치 1.2. Android Studio 설치 – Preferences > Plugins > Browse repositories… – Flutter > install > Restart – Dart > install > Restart 2. Git으로 SDK 코드 받아오고 설정하기 1234567    git… Continue Reading →

© 2018 원강민의 Wonhada 블로그 — Powered by WordPress

Theme by Anders NorenUp ↑