Skip to content
Open

1231 #30

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 21 additions & 20 deletions lib/screen/album/catchbox.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ 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);

Expand Down Expand Up @@ -57,23 +56,28 @@ class _CatchboxState extends State<Catchbox> {
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<QuerySnapshot>(
stream: FirebaseFirestore.instance.collection('category').doc("[email protected]").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,
Expand All @@ -94,28 +98,25 @@ class _CatchboxState extends State<Catchbox> {
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,
Expand Down