-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from disciplinas-prof-Edeilson-UFT/release_3.0.0
Release 3.0.0
- Loading branch information
Showing
24 changed files
with
728 additions
and
359 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
import 'package:ifood_engenharia_de_software/models/banner_de_categoria_model.dart'; | ||
|
||
class AlterarBannerDeCategoria { | ||
|
||
final List<CategoriaBanner> listacategoria; | ||
|
||
AlterarBannerDeCategoria(this.listacategoria); | ||
AlterarBannerDeCategoria( this.listacategoria); | ||
|
||
BannerDeCategoriaModel bannerdecategoriaData = const BannerDeCategoriaModel([ | ||
CategoriaBanner('Express'), | ||
CategoriaBanner('Mercado'), | ||
CategoriaBanner('Farmácia'), | ||
CategoriaBanner('Bebidas'), | ||
CategoriaBanner('Pizza'), | ||
CategoriaBanner('Lanches') | ||
]); | ||
BannerDeCategoriaModel bannerdecategoriaData = const BannerDeCategoriaModel( | ||
[ CategoriaBanner('Salgados','https://cdn.discordapp.com/attachments/814528592419094570/912145821808599060/salgados1.jpg'), | ||
CategoriaBanner('Lanches','https://cdn.discordapp.com/attachments/814528592419094570/912145821292716062/lanches1.jpg'), | ||
CategoriaBanner('Carnes','https://cdn.discordapp.com/attachments/814528592419094570/912145821049438238/carnes1.jpg'), | ||
CategoriaBanner('Pizza','https://cdn.discordapp.com/attachments/814528592419094570/912145821565341736/pizza1.jpg'), | ||
CategoriaBanner('Japonesa','https://cdn.discordapp.com/attachments/814528592419094570/912154611559858266/19C1-japonesa.png'), | ||
CategoriaBanner('Açaí','https://cdn.discordapp.com/attachments/814528592419094570/912154798323793930/19C1-acai.png'), | ||
CategoriaBanner('Bebidas','https://cdn.discordapp.com/attachments/814528592419094570/912191740105089054/19C1-bebidas.png'), | ||
CategoriaBanner('Saudável','https://cdn.discordapp.com/attachments/814528592419094570/912191814440742992/19C1-saudavel-v2.png'), | ||
CategoriaBanner('Brasileira','https://cdn.discordapp.com/attachments/814528592419094570/912191878458380308/19C1-brasileira-v2.png'), | ||
CategoriaBanner('Cozinha Rápida','https://cdn.discordapp.com/attachments/814528592419094570/912191949136605184/19C1-comida-rapida.png') | ||
]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import 'package:ifood_engenharia_de_software/models/mais_pedidos_por_vc_model.dart'; | ||
|
||
class AlterarMaisPedidos { | ||
final List<MaisPedidos> maispedidoslist; | ||
|
||
AlterarMaisPedidos(this.maispedidoslist); | ||
|
||
MaisPedidosModel maispedidosData = const MaisPedidosModel([ | ||
MaisPedidos('Bar do Diluc', 'Fechado', | ||
'https://cdn.discordapp.com/attachments/809775517493624852/910734117115674624/b3225dcdeebef9074c9c082afde8d495_2527226506439238336.png'), | ||
MaisPedidos('Noelle´s Pancakes', '', | ||
'https://cdn.discordapp.com/attachments/809775517493624852/910732173445832754/4ea27fde21b997bc3fb141786fc1719c_6363129461192613770.png'), | ||
MaisPedidos('Escudo Inquebrável', 'Fechado', | ||
'https://cdn.discordapp.com/attachments/809775517493624852/910740130833244160/show.png'), | ||
MaisPedidos('Presente dos Reis', 'Fechado', | ||
'https://media.discordapp.net/attachments/809775517493624852/910736507881553931/b891ddaf349a66bf1cdcccabec3c9a5b.png'), | ||
MaisPedidos('Vikings', '', | ||
'https://cdn.discordapp.com/attachments/809775517493624852/910736208626323497/22132_800x800.png') | ||
]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,27 @@ | ||
import 'package:cloud_firestore/cloud_firestore.dart'; | ||
import 'package:ifood_engenharia_de_software/models/peca_novamente_model.dart'; | ||
|
||
class AlterarPecaNovamente { | ||
final String urlLogoRestaurante; | ||
final List<Produto> pedidos; | ||
import '../app_store.dart'; | ||
|
||
AlterarPecaNovamente(this.urlLogoRestaurante, this.pedidos); | ||
class AtualizarPecaNovamente { | ||
FirebaseFirestore firestore = FirebaseFirestore.instance; | ||
final PecaNovamenteModel pecaNovamenteData; | ||
|
||
PecaNovamenteModel pecaNovamenteData = const PecaNovamenteModel( | ||
'https://aguardando.fase.de.utilizar.o.storage/', | ||
[Produto('Pizza G Calabresa C/Borda Mista', 1)]); | ||
AtualizarPecaNovamente({this.pecaNovamenteData = const PecaNovamenteModel()}); | ||
|
||
void atualizar() { | ||
firestore | ||
.collection('pecadenovo') | ||
.doc('zVxxTLxTaNDSsy4LWmfH') | ||
.get() | ||
.then((DocumentSnapshot documento) { | ||
String urlLogoRestaurante = documento['logo_estabelecimento_img_url']; | ||
Produto produto = Produto(documento['produto'], documento['quantidade']); | ||
PecaNovamenteModel pecaNovamenteData = PecaNovamenteModel( | ||
urlLogoRestaurante: urlLogoRestaurante, pedidos: [produto]); | ||
|
||
appStore.dispatcher( | ||
AtualizarPecaNovamente(pecaNovamenteData: pecaNovamenteData)); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import 'package:ifood_engenharia_de_software/models/ultimas_lojas_model.dart'; | ||
|
||
class AlterarUltimasLojas { | ||
final List<Lojas> listadaslojas; | ||
|
||
AlterarUltimasLojas(this.listadaslojas); | ||
|
||
UltimasLojasModel ultimaslojasData = const UltimasLojasModel( | ||
[ | ||
Lojas("McDonald's",'https://i.imgur.com/L8VcJbD.png'), | ||
Lojas('Burger King','https://i.imgur.com/BhBX8HH.png'), | ||
Lojas('Giraffas','https://i.imgur.com/0I9W33L.png'), | ||
Lojas('Subway','https://i.imgur.com/rYyDTK6.png'), | ||
] | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,42 @@ | ||
import 'actions/banner_de_categoria_action.dart'; | ||
import 'actions/card_da_categoria_componente_action.dart'; | ||
import 'actions/card_mais_pedidos_por_vc_action.dart'; | ||
import 'actions/navegacao_rodape_action.dart'; | ||
import 'actions/peca_novamente_action.dart'; | ||
import 'actions/card_da_categoria_componente_action.dart'; | ||
import 'app_state.dart'; | ||
import 'actions/banner_de_categoria_action.dart'; | ||
import 'actions/ultimas_lojas_action.dart'; | ||
|
||
AppState reducer(AppState state, dynamic action) { | ||
if (action is AlterarPagina) { | ||
return AppState(paginaAtual: action.pagina); | ||
} else if (action is AlterarPecaNovamente) { | ||
if (action.pagina == 2) { | ||
AtualizarPecaNovamente().atualizar(); | ||
} | ||
return AppState( | ||
paginaAtual: action.pagina, pecaNovamenteData: state.pecaNovamenteData); | ||
} else if (action is AtualizarPecaNovamente) { | ||
return AppState( | ||
paginaAtual: state.paginaAtual, | ||
pecaNovamenteData: action.pecaNovamenteData); | ||
} else if (action is AlterarMaisPedidos) { | ||
return AppState( | ||
paginaAtual: state.paginaAtual, | ||
maispedidosData: action.maispedidosData); | ||
} else if (action is AlterarBannerDeCategoria) { | ||
return AppState( | ||
paginaAtual: state.paginaAtual, | ||
bannerdecategoriaData: action.bannerdecategoriaData); | ||
} else if (action is AlterarCard) { | ||
return AppState( | ||
paginaAtual: state.paginaAtual, | ||
cardcategoriaData: action.cardcategoriaData); | ||
} else { | ||
cardcategoriaData:action.cardcategoriaData); | ||
}else if (action is AlterarUltimasLojas) { | ||
return AppState( | ||
paginaAtual: state.paginaAtual, | ||
ultimaslojasData:action.ultimaslojasData); | ||
}else { | ||
|
||
return AppState(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,74 @@ | ||
import 'package:flutter/cupertino.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:ifood_engenharia_de_software/models/banner_de_categoria_model.dart'; | ||
import 'package:ifood_engenharia_de_software/utilities/cores.dart'; | ||
|
||
class BannersDeCategorias extends StatelessWidget { | ||
final List<CategoriaBanner> listacategoria; | ||
|
||
const BannersDeCategorias({Key? key, required this.listacategoria}) | ||
: super(key: key); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
final ButtonStyle style = ElevatedButton.styleFrom( | ||
textStyle: const TextStyle(fontSize: 15, fontWeight: FontWeight.bold), | ||
fixedSize: const Size(175, 70), | ||
primary: AppCores.vermelhoPrincipal); | ||
|
||
return GridView.builder( | ||
scrollDirection: Axis.vertical, | ||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( | ||
crossAxisCount: 2, | ||
childAspectRatio: (4 / 2), | ||
crossAxisSpacing: 20, | ||
mainAxisSpacing: 20), | ||
crossAxisSpacing: 10, | ||
mainAxisSpacing: 10), | ||
shrinkWrap: true, | ||
itemCount: listacategoria.length, | ||
itemBuilder: (BuildContext context, index) { | ||
return ElevatedButton( | ||
style: style, | ||
onPressed: () {}, | ||
child: Column(children: [ | ||
const SizedBox(height: 15), | ||
Row(children: [ | ||
Text(listacategoria[index].nome), | ||
]) | ||
])); | ||
}); | ||
return Container( | ||
height: 100, | ||
width: 400, | ||
decoration: BoxDecoration( | ||
borderRadius: BorderRadius.circular(5), | ||
color: Colors.grey[100], | ||
image: DecorationImage( | ||
fit: BoxFit.fill, | ||
image: NetworkImage(listacategoria[index].imgurl) | ||
), | ||
), | ||
|
||
child:Padding( | ||
padding: const EdgeInsets.all(5), | ||
child:Text(listacategoria[index].nome, | ||
style: const TextStyle(fontSize: 15, fontWeight: FontWeight.bold, color: Colors.white),) | ||
) | ||
); | ||
} | ||
); | ||
} | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.