Fakultas Ilmu Komputer UI

Commit 6ee30340 authored by Tsamara Esperanti Erwin's avatar Tsamara Esperanti Erwin 🦄
Browse files

Coldfix pbi7

parent 73d09c86
...@@ -351,9 +351,11 @@ class _ModalCartItem extends StatelessWidget { ...@@ -351,9 +351,11 @@ class _ModalCartItem extends StatelessWidget {
flex: 5, flex: 5,
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment.spaceAround,
children: <Widget>[ children: <Widget>[
Ink( Ink(
width: 30,
height: 30,
decoration: const ShapeDecoration( decoration: const ShapeDecoration(
color: Colors.red, color: Colors.red,
shape: CircleBorder(), shape: CircleBorder(),
...@@ -366,7 +368,7 @@ class _ModalCartItem extends StatelessWidget { ...@@ -366,7 +368,7 @@ class _ModalCartItem extends StatelessWidget {
.decrement(); .decrement();
}, },
color: Colors.white, color: Colors.white,
iconSize: 30)), iconSize: 15)),
Consumer<CounterItem>( Consumer<CounterItem>(
builder: (_, counter, __) => Text( builder: (_, counter, __) => Text(
'${counter.total}', '${counter.total}',
...@@ -375,6 +377,8 @@ class _ModalCartItem extends StatelessWidget { ...@@ -375,6 +377,8 @@ class _ModalCartItem extends StatelessWidget {
), ),
), ),
Ink( Ink(
width: 30,
height: 30,
decoration: const ShapeDecoration( decoration: const ShapeDecoration(
color: Colors.green, color: Colors.green,
shape: CircleBorder(), shape: CircleBorder(),
...@@ -387,7 +391,7 @@ class _ModalCartItem extends StatelessWidget { ...@@ -387,7 +391,7 @@ class _ModalCartItem extends StatelessWidget {
.increment(); .increment();
}, },
color: Colors.white, color: Colors.white,
iconSize: 30, iconSize: 15,
)), )),
], ],
), ),
......
...@@ -151,21 +151,24 @@ class _DonasiBarangState extends State<DonasiBarang> { ...@@ -151,21 +151,24 @@ class _DonasiBarangState extends State<DonasiBarang> {
), ),
const SizedBox(width: 70), const SizedBox(width: 70),
Container( Container(
width: 187, width: MediaQuery.of(context).size.width / 1.8,
height: 80, height: 80,
color: Colors.white, color: Colors.white,
child: TextFormField( child: Padding(
controller: addressController, padding: const EdgeInsets.only(top: 8.0),
keyboardType: child: TextFormField(
TextInputType.multiline, controller: addressController,
validator: (value) { keyboardType:
if (value.isEmpty) { TextInputType.multiline,
return 'Mohon isi alamat'; validator: (value) {
} if (value.isEmpty) {
return null; return 'Mohon isi alamat';
}, }
maxLines: 5, return null;
decoration: _inputDecoration())) },
maxLines: 5,
decoration: _inputDecoration()),
))
], ],
); );
}); });
...@@ -359,7 +362,7 @@ class _GoodsFormState extends State<GoodsForm> { ...@@ -359,7 +362,7 @@ class _GoodsFormState extends State<GoodsForm> {
), ),
const SizedBox(width: 20), const SizedBox(width: 20),
Container( Container(
width: 187, width: MediaQuery.of(context).size.width / 1.8,
height: 50, height: 50,
child: TextFormField( child: TextFormField(
key: const Key('goods-desc'), key: const Key('goods-desc'),
...@@ -399,7 +402,7 @@ class _GoodsFormState extends State<GoodsForm> { ...@@ -399,7 +402,7 @@ class _GoodsFormState extends State<GoodsForm> {
), ),
const SizedBox(width: 70), const SizedBox(width: 70),
Container( Container(
width: 187, width: MediaQuery.of(context).size.width / 1.8,
height: 50, height: 50,
color: Colors.white, color: Colors.white,
child: TextFormField( child: TextFormField(
......
...@@ -336,7 +336,7 @@ class _FormViewState extends State<_FormView> { ...@@ -336,7 +336,7 @@ class _FormViewState extends State<_FormView> {
onPressed: _buttonSendClicked, onPressed: _buttonSendClicked,
label: context.watch<Donation>() != null label: context.watch<Donation>() != null
? 'Unggah ulang' ? 'Unggah ulang'
: 'Donasi')), : 'Donasi Sekarang')),
const Divider( const Divider(
height: 10, height: 10,
), ),
......
...@@ -68,6 +68,8 @@ class _SliverAppBarProductState extends State<SliverAppBarProduct> { ...@@ -68,6 +68,8 @@ class _SliverAppBarProductState extends State<SliverAppBarProduct> {
firstChild: Material( firstChild: Material(
color: Colors.transparent, color: Colors.transparent,
child: Ink( child: Ink(
height: 40,
width: 40,
decoration: ShapeDecoration( decoration: ShapeDecoration(
color: Colors.grey.withOpacity(0.7), color: Colors.grey.withOpacity(0.7),
shape: const CircleBorder(), shape: const CircleBorder(),
...@@ -184,6 +186,8 @@ class _ActionFlexibleExpanded extends StatelessWidget { ...@@ -184,6 +186,8 @@ class _ActionFlexibleExpanded extends StatelessWidget {
return Material( return Material(
color: Colors.transparent, color: Colors.transparent,
child: Ink( child: Ink(
height: 40,
width: 40,
decoration: ShapeDecoration( decoration: ShapeDecoration(
color: Colors.grey.withOpacity(0.7), color: Colors.grey.withOpacity(0.7),
shape: const CircleBorder(), shape: const CircleBorder(),
......
...@@ -118,9 +118,11 @@ class _BodyDetailProduct extends StatelessWidget { ...@@ -118,9 +118,11 @@ class _BodyDetailProduct extends StatelessWidget {
flex: 5, flex: 5,
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment.spaceAround,
children: <Widget>[ children: <Widget>[
Ink( Ink(
width: 30,
height: 30,
decoration: decoration:
const ShapeDecoration( const ShapeDecoration(
color: Colors.red, color: Colors.red,
...@@ -134,7 +136,7 @@ class _BodyDetailProduct extends StatelessWidget { ...@@ -134,7 +136,7 @@ class _BodyDetailProduct extends StatelessWidget {
.decrement(); .decrement();
}, },
color: Colors.white, color: Colors.white,
iconSize: 30)), iconSize: 15)),
Consumer<CounterItem>( Consumer<CounterItem>(
builder: (_, counter, __) => Text( builder: (_, counter, __) => Text(
'${counter.total}', '${counter.total}',
...@@ -143,6 +145,8 @@ class _BodyDetailProduct extends StatelessWidget { ...@@ -143,6 +145,8 @@ class _BodyDetailProduct extends StatelessWidget {
), ),
), ),
Ink( Ink(
width: 30,
height: 30,
decoration: const ShapeDecoration( decoration: const ShapeDecoration(
color: Colors.green, color: Colors.green,
shape: CircleBorder(), shape: CircleBorder(),
...@@ -155,7 +159,7 @@ class _BodyDetailProduct extends StatelessWidget { ...@@ -155,7 +159,7 @@ class _BodyDetailProduct extends StatelessWidget {
.increment(); .increment();
}, },
color: Colors.white, color: Colors.white,
iconSize: 30, iconSize: 15,
)), )),
], ],
), ),
......
...@@ -12,6 +12,7 @@ import 'package:home_industry/Pages/Profile/bloc/profile_event.dart'; ...@@ -12,6 +12,7 @@ import 'package:home_industry/Pages/Profile/bloc/profile_event.dart';
import 'package:home_industry/Pages/Profile/bloc/profile_state.dart'; import 'package:home_industry/Pages/Profile/bloc/profile_state.dart';
import 'package:home_industry/Pages/Profile/model/profile.dart'; import 'package:home_industry/Pages/Profile/model/profile.dart';
import 'package:image_picker/image_picker.dart'; import 'package:image_picker/image_picker.dart';
import 'package:outline_material_icons/outline_material_icons.dart';
class EditProfile extends StatelessWidget { class EditProfile extends StatelessWidget {
const EditProfile({Key key}) : super(key: key); const EditProfile({Key key}) : super(key: key);
...@@ -344,7 +345,7 @@ class _EditFormState extends State<EditForm> { ...@@ -344,7 +345,7 @@ class _EditFormState extends State<EditForm> {
flex: 20, flex: 20,
child: CustomTextInputForm( child: CustomTextInputForm(
isNumberOnly: true, isNumberOnly: true,
prefixIcon: Icons.my_location, prefixIcon: OMIcons.nearMe,
key: const Key('rt'), key: const Key('rt'),
label: 'RT', label: 'RT',
onSave: _updateRt, onSave: _updateRt,
...@@ -359,7 +360,7 @@ class _EditFormState extends State<EditForm> { ...@@ -359,7 +360,7 @@ class _EditFormState extends State<EditForm> {
flex: 20, flex: 20,
child: CustomTextInputForm( child: CustomTextInputForm(
isNumberOnly: true, isNumberOnly: true,
prefixIcon: Icons.my_location, prefixIcon: OMIcons.nearMe,
key: const Key('rw'), key: const Key('rw'),
label: 'RW', label: 'RW',
onSave: _updateRw, onSave: _updateRw,
...@@ -378,7 +379,7 @@ class _EditFormState extends State<EditForm> { ...@@ -378,7 +379,7 @@ class _EditFormState extends State<EditForm> {
flex: 20, flex: 20,
child: CustomTextInputForm( child: CustomTextInputForm(
key: const Key('kelurahan'), key: const Key('kelurahan'),
prefixIcon: Icons.location_searching, prefixIcon: Icons.near_me,
label: 'Kelurahan', label: 'Kelurahan',
onSave: _updateKelurahan, onSave: _updateKelurahan,
maxLength: 100, maxLength: 100,
...@@ -393,7 +394,7 @@ class _EditFormState extends State<EditForm> { ...@@ -393,7 +394,7 @@ class _EditFormState extends State<EditForm> {
child: CustomTextInputForm( child: CustomTextInputForm(
key: const Key('kecamatan'), key: const Key('kecamatan'),
label: 'Kecamatan', label: 'Kecamatan',
prefixIcon: Icons.location_searching, prefixIcon: Icons.near_me,
onSave: _updateKecamatan, onSave: _updateKecamatan,
maxLength: 100, maxLength: 100,
initialValue: widget.profile.subDistrict, initialValue: widget.profile.subDistrict,
......
...@@ -73,11 +73,9 @@ class DetailProgram extends StatelessWidget { ...@@ -73,11 +73,9 @@ class DetailProgram extends StatelessWidget {
'${formatDate(program.startDateTime)}'), '${formatDate(program.startDateTime)}'),
if (program.endDateTime != null) if (program.endDateTime != null)
_DeskripsiRow( _DeskripsiRow(
icon: Icons.cancel, icon: Icons.schedule,
label: label:
'${formatTime(program.startDateTime)}' '${formatTime(program.startDateTime)}',
' - '
'${formatTime(program.endDateTime)}',
), ),
if (program.location != null && if (program.location != null &&
program.location != '') program.location != '')
......
...@@ -64,7 +64,7 @@ class _ProgramsState extends State<Programs> { ...@@ -64,7 +64,7 @@ class _ProgramsState extends State<Programs> {
RepositoryProvider.of<ProgramRepository>(context)) RepositoryProvider.of<ProgramRepository>(context))
..add(const FetchProgram()), ..add(const FetchProgram()),
child: Column(children: <Widget>[ child: Column(children: <Widget>[
programList programList,
]), ]),
), ),
), ),
...@@ -157,25 +157,25 @@ class __ListProgramState extends State<_ListProgram> { ...@@ -157,25 +157,25 @@ class __ListProgramState extends State<_ListProgram> {
), ),
); );
} else { } else {
return SizedBox( return Column(
height: MediaQuery.of(context).size.height - 50, children: [
child: ListView.builder( ListView.builder(
itemCount: state.hasReachedMax itemCount: state.hasReachedMax
? state.programs.length ? state.programs.length
: state.programs.length + 1, : state.programs.length + 1,
controller: _scrollController, controller: _scrollController,
padding: const EdgeInsets.symmetric(horizontal: 10), padding: const EdgeInsets.symmetric(horizontal: 10),
physics: const BouncingScrollPhysics(), physics: const BouncingScrollPhysics(),
shrinkWrap: true, shrinkWrap: true,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return index >= state.programs.length return index >= state.programs.length
? const Center( ? Container()
child: CustomCircularIndicator(), : ProgramCard(
) program: state.programs[index],
: ProgramCard( );
program: state.programs[index], }),
); Container(height: 10)
}), ],
); );
} }
} else if (state is ListProgramsSortedLoaded) { } else if (state is ListProgramsSortedLoaded) {
...@@ -187,25 +187,25 @@ class __ListProgramState extends State<_ListProgram> { ...@@ -187,25 +187,25 @@ class __ListProgramState extends State<_ListProgram> {
), ),
); );
} else { } else {
return SizedBox( return Column(
height: MediaQuery.of(context).size.height - 50, children: [
child: ListView.builder( ListView.builder(
itemCount: state.hasReachedMax itemCount: state.hasReachedMax
? state.programs.length ? state.programs.length
: state.programs.length + 1, : state.programs.length + 1,
controller: _scrollController, controller: _scrollController,
padding: const EdgeInsets.symmetric(horizontal: 10), padding: const EdgeInsets.symmetric(horizontal: 10),
physics: const BouncingScrollPhysics(), physics: const BouncingScrollPhysics(),
shrinkWrap: true, shrinkWrap: true,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return index >= state.programs.length return index >= state.programs.length
? const Center( ? Container()
child: CustomCircularIndicator(), : ProgramCard(
) program: state.programs[index],
: ProgramCard( );
program: state.programs[index], }),
); Container(height: 10)
}), ],
); );
} }
} }
...@@ -269,25 +269,25 @@ class __ListProgramSortStatusState extends State<_ListProgramSortStatus> { ...@@ -269,25 +269,25 @@ class __ListProgramSortStatusState extends State<_ListProgramSortStatus> {
), ),
); );
} else { } else {
return SizedBox( return Column(
height: MediaQuery.of(context).size.height - 50, children: [
child: ListView.builder( ListView.builder(
itemCount: state.hasReachedMax itemCount: state.hasReachedMax
? state.programs.length ? state.programs.length
: state.programs.length + 1, : state.programs.length + 1,
controller: _scrollController, controller: _scrollController,
padding: const EdgeInsets.symmetric(horizontal: 10), padding: const EdgeInsets.symmetric(horizontal: 10),
physics: const BouncingScrollPhysics(), physics: const BouncingScrollPhysics(),
shrinkWrap: true, shrinkWrap: true,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return index >= state.programs.length return index >= state.programs.length
? const Center( ? Container()
child: CustomCircularIndicator(), : ProgramCard(
) program: state.programs[index],
: ProgramCard( );
program: state.programs[index], }),
); Container(height: 10)
}), ],
); );
} }
} }
......
...@@ -7,6 +7,7 @@ import 'package:home_industry/Pages/Register/bloc/bloc.dart'; ...@@ -7,6 +7,7 @@ import 'package:home_industry/Pages/Register/bloc/bloc.dart';
import 'package:home_industry/Pages/Register/model/register_model.dart'; import 'package:home_industry/Pages/Register/model/register_model.dart';
import 'package:home_industry/Pages/Register/repositories/register_repository.dart'; import 'package:home_industry/Pages/Register/repositories/register_repository.dart';
import 'package:home_industry/State/Auth/repositories/depedencies_repositories.dart'; import 'package:home_industry/State/Auth/repositories/depedencies_repositories.dart';
import 'package:outline_material_icons/outline_material_icons.dart';
class Register extends StatelessWidget { class Register extends StatelessWidget {
const Register({Key key}) : super(key: key); const Register({Key key}) : super(key: key);
...@@ -219,7 +220,7 @@ class _RegisterFormState extends State<RegisterForm> { ...@@ -219,7 +220,7 @@ class _RegisterFormState extends State<RegisterForm> {
flex: 20, flex: 20,
child: CustomTextInputForm( child: CustomTextInputForm(
isNumberOnly: true, isNumberOnly: true,
prefixIcon: Icons.my_location, prefixIcon: OMIcons.nearMe,
key: const Key('rt'), key: const Key('rt'),
label: 'RT', label: 'RT',
onSave: _updateRt, onSave: _updateRt,
...@@ -233,7 +234,7 @@ class _RegisterFormState extends State<RegisterForm> { ...@@ -233,7 +234,7 @@ class _RegisterFormState extends State<RegisterForm> {
flex: 20, flex: 20,
child: CustomTextInputForm( child: CustomTextInputForm(
isNumberOnly: true, isNumberOnly: true,
prefixIcon: Icons.my_location, prefixIcon: OMIcons.nearMe,
key: const Key('rw'), key: const Key('rw'),
label: 'RW', label: 'RW',
onSave: _updateRw, onSave: _updateRw,
...@@ -251,7 +252,7 @@ class _RegisterFormState extends State<RegisterForm> { ...@@ -251,7 +252,7 @@ class _RegisterFormState extends State<RegisterForm> {
flex: 20, flex: 20,
child: CustomTextInputForm( child: CustomTextInputForm(
key: const Key('kelurahan'), key: const Key('kelurahan'),
prefixIcon: Icons.location_searching, prefixIcon: Icons.near_me,
label: 'Kelurahan', label: 'Kelurahan',
onSave: _updateKelurahan, onSave: _updateKelurahan,
maxLength: 100, maxLength: 100,
...@@ -265,7 +266,7 @@ class _RegisterFormState extends State<RegisterForm> { ...@@ -265,7 +266,7 @@ class _RegisterFormState extends State<RegisterForm> {
child: CustomTextInputForm( child: CustomTextInputForm(
key: const Key('kecamatan'), key: const Key('kecamatan'),
label: 'Kecamatan', label: 'Kecamatan',
prefixIcon: Icons.location_searching, prefixIcon: Icons.near_me,
onSave: _updateKecamatan, onSave: _updateKecamatan,
maxLength: 100, maxLength: 100,
onSubmit: _handleSubmitted, onSubmit: _handleSubmitted,
......
...@@ -260,9 +260,7 @@ class __BodyState extends State<_Body> { ...@@ -260,9 +260,7 @@ class __BodyState extends State<_Body> {
); );
} else if (state is FetchOrderSuccess && (state.transaction.transactionStatus == } else if (state is FetchOrderSuccess && (state.transaction.transactionStatus ==
StatusTransaction.waitProof || state.transaction.transactionStatus == StatusTransaction.waitProof || state.transaction.transactionStatus ==
StatusTransaction.canceled || StatusTransaction.waitSellerConfirmation)) {
state.transaction.transactionStatus ==
StatusTransaction.waitSellerConfirmation)) {
return Provider<Transaction>.value( return Provider<Transaction>.value(
value: state.transaction, value: state.transaction,
child: RefreshIndicator( child: RefreshIndicator(
...@@ -271,24 +269,69 @@ class __BodyState extends State<_Body> { ...@@ -271,24 +269,69 @@ class __BodyState extends State<_Body> {
.add(const RefreshOrderDetail()); .add(const RefreshOrderDetail());
return _refreshCompleter.future; return _refreshCompleter.future;
}, },
child: ListView( child: Padding(
physics: const AlwaysScrollableScrollPhysics( padding: const EdgeInsets.only(bottom: 50),
parent: BouncingScrollPhysics()), child: ListView(
padding: physics: const AlwaysScrollableScrollPhysics(
const EdgeInsets.symmetric(horizontal: 15, vertical: 20), parent: BouncingScrollPhysics()),
children: const <Widget>[ padding:
_Alamat(), const EdgeInsets.symmetric(horizontal: 15, vertical: 20),
Divider( children: const <Widget>[
height: 20, _Alamat(),
thickness: 2, Padding(
), padding: EdgeInsets.only(left: 10.0, top: 5.0),
_Summary(), child: Text('Barang akan dikirim setelah transaksi terkonfirmasi',
Divider( style: TextStyle(
height: 20, fontSize: 12,
thickness: 2, color: Color.fromRGBO(60, 141, 188, 1)),),
), ),