Skip to content

Commit

Permalink
FEAT: post 샘플 코드
Browse files Browse the repository at this point in the history
  • Loading branch information
bianbbc87 committed Feb 8, 2024
1 parent a1d427e commit 7a2ebd0
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 8 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ android {
applicationId "com.example.inglo"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion flutter.minSdkVersion
minSdkVersion 20
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down
3 changes: 2 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:inglo/screens/home/home.dart';
import 'package:inglo/screens/post/create_post.dart';
import 'package:inglo/screens/signup/signup.dart';
import 'screens/signin/signin.dart';
import 'package:inglo/screens/issuelist/issulist.dart';
Expand Down Expand Up @@ -35,7 +36,7 @@ class _MainScreenState extends State<MainScreen> {
final List<Widget> _pages = [
IssueListPage(),
AccountPage(),
NotificationsPage(),
CreatePost(),
MessagesPage(),
// MessagesPage(),
// 참고 페이지(나중에 삭제)
Expand Down
100 changes: 100 additions & 0 deletions lib/screens/post/create_post.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
import 'package:flutter/material.dart';

class CreatePost extends StatelessWidget {
const CreatePost ({super.key});

@override
Widget build(BuildContext context) {
return Scaffold(
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Icon(Icons.arrow_back),
const SizedBox(
width: 20,
),
Text('Create Post'),
Spacer(),
ElevatedButton(
style: ElevatedButton.styleFrom(backgroundColor: Colors.grey),
onPressed: () {},
child: Text('Post'),
)
],
),
Divider(
thickness: 1,
),
const SizedBox(
height: 20,
),
ListTile(
contentPadding: EdgeInsets.zero,
leading: Image.network(
'https://upload.wikimedia.org/wikipedia/commons/4/44/Facebook_Logo.png'),
title: Text("Username Here"),
subtitle: Padding(
padding: EdgeInsets.only(top: 10),
child: Row(
children: [
Expanded(
child: OutlinedButton.icon(
style: OutlinedButton.styleFrom(
foregroundColor: Colors.grey),
onPressed: () {},
icon: Icon(Icons.group),
label: Row(
children: [
Text('Friends'),
Expanded(
child: Icon(
Icons.arrow_drop_down,
),
)
],
),
),
),
const SizedBox(
width: 20,
),
Expanded(
child: OutlinedButton.icon(
style: OutlinedButton.styleFrom(
foregroundColor: Colors.grey),
onPressed: () {},
icon: Icon(Icons.add),
label: Row(
children: [
Text('Album'),
Expanded(
child: Icon(
Icons.arrow_drop_down,
),
),
],
),
),
),
],
),
),
),
const SizedBox(
height: 20,
),
TextFormField(
maxLines: 5,
decoration: InputDecoration(
border: InputBorder.none,
hintText: 'What\'s on your Mind?',
hintStyle: TextStyle(fontSize: 20),
),
),
],
),
);
}
}
12 changes: 6 additions & 6 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -505,26 +505,26 @@ packages:
dependency: transitive
description:
name: vector_graphics
sha256: "18f6690295af52d081f6808f2f7c69f0eed6d7e23a71539d75f4aeb8f0062172"
sha256: "4ac59808bbfca6da38c99f415ff2d3a5d7ca0a6b4809c71d9cf30fba5daf9752"
url: "https://pub.dev"
source: hosted
version: "1.1.9+2"
version: "1.1.10+1"
vector_graphics_codec:
dependency: transitive
description:
name: vector_graphics_codec
sha256: "531d20465c10dfac7f5cd90b60bbe4dd9921f1ec4ca54c83ebb176dbacb7bb2d"
sha256: f3247e7ab0ec77dc759263e68394990edc608fb2b480b80db8aa86ed09279e33
url: "https://pub.dev"
source: hosted
version: "1.1.9+2"
version: "1.1.10+1"
vector_graphics_compiler:
dependency: transitive
description:
name: vector_graphics_compiler
sha256: "03012b0a33775c5530576b70240308080e1d5050f0faf000118c20e6463bc0ad"
sha256: "18489bdd8850de3dd7ca8a34e0c446f719ec63e2bab2e7a8cc66a9028dd76c5a"
url: "https://pub.dev"
source: hosted
version: "1.1.9+2"
version: "1.1.10+1"
vector_math:
dependency: transitive
description:
Expand Down

0 comments on commit 7a2ebd0

Please sign in to comment.