new flutter project 후
android, ios 의 app id, bundle id를 수정한다.
- android: android/app/build.gradle
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.actumn.stickynotes"
minSdkVersion 16
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
- ios: macos가 없어서 스킵
xcode로 연 후에
runner target 수정
- page/note_list_page.dart
import 'package:flutter/material.dart';
class NoteListPage extends StatefulWidget {
@override
State createState() => _NoteListPageState();
}
class _NoteListPageState extends State<NoteListPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Sticky Notes'),
),
);
}
}
- main.dart
import 'package:flutter/material.dart';
import 'package:sticky_notes/page/note_list_page.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Sticky Notes',
theme: ThemeData(
primarySwatch: Colors.teal,
visualDensity: VisualDensity.adaptivePlatformDensity
),
home: NoteListPage(),
);
}
}
Uploaded by Notion2Tistory v1.1.0