From 54de86296cee6402ba85eaeba8d522c5bd463d80 Mon Sep 17 00:00:00 2001 From: gracentruth <63465350+gracentruth@users.noreply.github.com> Date: Fri, 30 Dec 2022 18:50:47 +0900 Subject: [PATCH 1/2] =?UTF-8?q?12/30=20=EC=88=98=EC=A0=952?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/screen/album/catchbox.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/screen/album/catchbox.dart b/lib/screen/album/catchbox.dart index f9b95a2..bf6cb7a 100644 --- a/lib/screen/album/catchbox.dart +++ b/lib/screen/album/catchbox.dart @@ -6,10 +6,10 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:firebase_storage/firebase_storage.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; //import '../utils/app_text_styles.dart'; -import '../../utils/app_text_styles.dart'; + import 'catchbox_detail.dart'; import 'package:firebase_storage/firebase_storage.dart' as firebase_storage; -import 'dart:math' as math; + class Catchbox extends StatefulWidget { const Catchbox({Key? key}) : super(key: key); From 5e799b82521cf1fbde67f37750a2cfc9565bd256 Mon Sep 17 00:00:00 2001 From: gracentruth <63465350+gracentruth@users.noreply.github.com> Date: Sat, 31 Dec 2022 00:35:44 +0900 Subject: [PATCH 2/2] ------- --- lib/screen/album/catchbox.dart | 39 +++++++++++++++++----------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/lib/screen/album/catchbox.dart b/lib/screen/album/catchbox.dart index bf6cb7a..478dce3 100644 --- a/lib/screen/album/catchbox.dart +++ b/lib/screen/album/catchbox.dart @@ -6,7 +6,6 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:firebase_storage/firebase_storage.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; //import '../utils/app_text_styles.dart'; - import 'catchbox_detail.dart'; import 'package:firebase_storage/firebase_storage.dart' as firebase_storage; @@ -57,23 +56,28 @@ class _CatchboxState extends State { TextTheme textTheme = Theme.of(context).textTheme; return Scaffold( appBar: AppBar( - automaticallyImplyLeading: false, - backgroundColor: Colors.white, - elevation: 1, - title: Center(child: Text('캐치박스',style: titleMediumStyle(color: Colors.black),)), + leading: IconButton( + padding: EdgeInsets.zero, + icon: Image.asset("assets/icons/icon_back.png"), + onPressed: (){ + // Get.back(); + }, + ), + centerTitle: true, + title: Text('캐치박스'),//,style: titleMedium.copyWith(color: Colors.black),), + elevation: 0, ), body: Container( child: Column( mainAxisAlignment: MainAxisAlignment.start, children: [ - //Text(''), Expanded( child: StreamBuilder( - stream: FirebaseFirestore.instance.collection('category').doc("1234@handong.ac.kr").collection('category').orderBy('order', descending: false).snapshots(), + stream: FirebaseFirestore.instance.collection('category').doc(FirebaseAuth.instance.currentUser!.email).collection('category').orderBy('category', descending: true).snapshots(), builder: (context, snapshot){ if(snapshot.hasData){ return Container( - margin: EdgeInsets.all(10), + margin: EdgeInsets.fromLTRB(15.w, 0, 15.w, 10.h), child: Center( child: GridView.count( shrinkWrap: true, @@ -94,28 +98,25 @@ class _CatchboxState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ SizedBox( - height: 165.65, - width: 160.65, + height: 165.65.h, + width: 160.65.w, child: Card( shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(4.76), ), clipBehavior: Clip.antiAlias, - child: Transform.rotate( - angle: (x['category']=='kickboard'||x['category']=='traffic light')?0:90*math.pi/180, - child: Image.network( - x['new'], - fit: BoxFit.cover, - ), - ) + child: Image.network( + x['new'], + fit: BoxFit.cover, + ), ), ), - SizedBox(height: 2), + SizedBox(height: 2.h), Container( child: Row( children: [ - SizedBox(width: 5), + SizedBox(width: 5.w), Container( child: Column( crossAxisAlignment: CrossAxisAlignment.start,