open:flutter-bootcamp-with-dart

flutter-bootcamp-with-dar

You can find the completed project under the course resources: https://github.com/londonappbrewery/Flutter-Course-Resources/

If you've got some niggling bugs or there is something wrong with your code that you can't figure out, compare your code against the finished version of the app.

To open the project inside Android Studio, simply clone the project from Github using VCS → Checkout from Version Control → Git. If you need a refresher on cloning repos, have a look at the first lesson from the MiCard module: https://www.udemy.com/course/flutter-bootcamp-with-dart/learn/lecture/14482104

Download the Completed Project
You can find the completed project under the course resources: https://github.com/londonappbrewery/Flutter-Course-Resources/

If you've got some niggling bugs or there is something wrong with your code that you can't figure out, compare your code against the finished version of the app.

To open the project inside Android Studio, simply clone the project from Github using VCS → Checkout from Version Control → Git. If you need a refresher on cloning repos, have a look at the first lesson from the MiCard module: https://www.udemy.com/course/flutter-bootcamp-with-dart/learn/lecture/14482104

Step 1 - Set Up The Project
Go to https://github.com/londonappbrewery/magic-8-ball-flutter and clone the starting project to your local computer. Open it using Android Studio and take a look around the project.

There is an images folder with all the ball images you will need.

There are a total of 5 images.
t

You can find the completed project under the course resources: https://github.com/londonappbrewery/Flutter-Course-Resources/

If you've got some niggling bugs or there is something wrong with your code that you can't figure out, compare your code against the finished version of the app.

To open the project inside Android Studio, simply clone the project from Github using VCS → Checkout from Version Control → Git. If you need a refresher on cloning repos, have a look at the first lesson from the MiCard module: https://www.udemy.com/course/flutter-bootcamp-with-dart/learn/lecture/14482104

쉘에서 flutter 프로젝트 생성

snippet.shell
flutter create [project_name]

android studio에서 File → New → New Flutter Project 로 프로젝트 생성

  1. https://appicon.co 에서 이미지 파일 생성

github: https://github.com/jacegem/hello_world_flutter/tree/master/i_am_rich

debug 배너 숨기기

snippet.dart
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: MyHomePage(),
    );
  }
}

같은 코드지만 플랫폼에 따라 서로 디자인이 다른 것을 확인할 수 있습니다.

iOS Android

이미지 출처 : http://pluspng.com/diamond-hd-png-6999.html

assets 폴더에 이미지 파일 넣기

snippet.dart
flutter:
  ....  
  assets:
    - assets/images/

snippet.dart
import 'package:flutter/material.dart';
 
class MyHomePage extends StatefulWidget {
  @override
  _MyHomePageState createState() => _MyHomePageState();
}
 
class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('I am Rich')),
      body: Center(
        child: Image(
          image: AssetImage('assets/images/diamond.png'),
        ),
      ),
    );
  }
}

https://pub.dev/packages/flutter_launcher_icons 패키지 사용

pubspec.yaml 파일 수정

snippet.dart
dependencies:
  ...
  flutter_launcher_icons: ^0.7.4
 
flutter_icons:
  image_path: "assets/images/diamond.png"
  android: true
  ios: true

패키지 실행

snippet.shell
flutter pub get
flutter pub run flutter_launcher_icons:main
  • open/flutter-bootcamp-with-dart.txt
  • 마지막으로 수정됨: 2020/06/02 09:25
  • 저자 127.0.0.1