Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge intermedio #10

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
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
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,17 @@ ios/Flutter/Release.xcconfig
macos/Flutter/Flutter-Debug.xcconfig
macos/Flutter/Flutter-Release.xcconfig
macos/Flutter/GeneratedPluginRegistrant.swift
linux/flutter/generated_plugin_registrant.cc
linux/flutter/generated_plugin_registrant.h
linux/flutter/generated_plugins.cmake
macos/Flutter/GeneratedPluginRegistrant.swift
windows/flutter/generated_plugin_registrant.cc
windows/flutter/generated_plugin_registrant.h
windows/flutter/generated_plugins.cmake
linux/flutter/generated_plugin_registrant.cc
linux/flutter/generated_plugin_registrant.h
linux/flutter/generated_plugins.cmake
macos/Flutter/GeneratedPluginRegistrant.swift
windows/flutter/generated_plugin_registrant.cc
windows/flutter/generated_plugin_registrant.h
windows/flutter/generated_plugins.cmake
Binary file added assets/images/disability.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/gender.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/logo_senza_scritte.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/politics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/racism.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/religion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/report_it_megaphone_man.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/sexual.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion lib/domain/entity/denuncia_entity.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Denuncia {
descrizione;

Timestamp scadenzaDocDenunciante, dataDenuncia;
GeoPoint coordCaserma;
GeoPoint? coordCaserma;

String? nomeCaserma, nomeUff, cognomeUff,idUff;

Expand Down
8 changes: 1 addition & 7 deletions lib/domain/repository/denuncia_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,13 @@ class DenunciaController{

Future<List<Denuncia>>visualizzaDenunceByUtente()async{

try {
final User? user = auth.currentUser;
if(user==null) {
print("NON SEI LOGGATO biscottooo");
}
else {
return await denunciaDao.retrieveByUtente(user.uid);
}
return Future.error(StackTrace);
}
catch(e){
print(e);
rethrow;
}
return Future.error(StackTrace);
}
}
165 changes: 2 additions & 163 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,27 +1,11 @@
// ignore_for_file: prefer_const_constructors, duplicate_ignore

import 'package:firebase_auth/firebase_auth.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
//per la navbar
import 'package:flutter_snake_navigationbar/flutter_snake_navigationbar.dart';
import 'package:iconsax/iconsax.dart';
import 'package:provider/provider.dart';
import 'package:report_it/firebase_options.dart';
import 'package:report_it/presentation/pages/authentication_wrapper.dart';
//per la faq ui
import 'package:report_it/presentation/pages/fake_index.dart';
import 'package:report_it/presentation/pages/Informativa_contatti.dart';

import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:report_it/data/Models/denuncia_dao.dart';
import 'package:report_it/domain/entity/categoria_denuncia.dart';
import 'package:report_it/domain/entity/stato_denuncia.dart';

import 'domain/repository/authentication_service.dart';
import 'package:report_it/presentation/widget/theme.dart';

void main() async {
WidgetsFlutterBinding.ensureInitialized();
Expand Down Expand Up @@ -49,156 +33,11 @@ class MyApp extends StatelessWidget {
child: MaterialApp(
title: 'Report.it',
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.red,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
theme: AppTheme().build(),
home: Scaffold(
body: AuthenticationWrapper(),
),
),
);
}
}

// class MyApp extends StatelessWidget {
// const MyApp({Key? key}) : super(key: key);

// @override
// Widget build(BuildContext context) {
// return const MaterialApp(
// title: 'SnakeNavigationBar Example ',
// home: SnakeNavigationBarExampleScreen(),
// );
// }
// }

// class SnakeNavigationBarExampleScreen extends StatefulWidget {
// const SnakeNavigationBarExampleScreen({Key? key}) : super(key: key);

// @override
// _SnakeNavigationBarExampleScreenState createState() =>
// _SnakeNavigationBarExampleScreenState();
// }

// class _SnakeNavigationBarExampleScreenState
// extends State<SnakeNavigationBarExampleScreen> {
// final BorderRadius _borderRadius = const BorderRadius.only(
// topLeft: Radius.circular(25),
// topRight: Radius.circular(25),
// );

// ShapeBorder? bottomBarShape = const RoundedRectangleBorder(
// borderRadius: BorderRadius.all(Radius.circular(25)),
// );
// SnakeBarBehaviour snakeBarStyle = SnakeBarBehaviour.floating;
// EdgeInsets padding = const EdgeInsets.all(12);

// int _selectedItemPosition = 2;
// SnakeShape snakeShape = SnakeShape.circle;

// bool showSelectedLabels = false;
// bool showUnselectedLabels = false;

// Color selectedColor = Colors.black;
// Color unselectedColor = Colors.blueGrey;

// Gradient selectedGradient =
// const LinearGradient(colors: [Colors.red, Colors.amber]);
// Gradient unselectedGradient = const LinearGradient(colors: [
// Color.fromARGB(255, 153, 235, 12),
// Color.fromARGB(255, 25, 52, 183)
// ]);

// Color? containerColor;
// List<Color> containerColors = [
// const Color(0xFFFDE1D7),
// const Color(0xFFE4EDF5),
// const Color(0xFFE7EEED),
// const Color(0xFFF4E4CE),
// ];

// // questo è l'indice della navbar, da aggiornare ad ogni nuova aggiunta
// final List<Widget> Pagine = [
// Fake_index(),
// Fake_index(),
// Informativa(),
// Fake_index(),
// Fake_index(),
// ];

// @override
// Widget build(BuildContext context) {
// return Scaffold(
// extendBodyBehindAppBar: true,
// resizeToAvoidBottomInset: true,
// extendBody: true,
// // APPBAR FUNZIONANTE ma attualmente non in uso
// appBar: AppBar(
// centerTitle: true,
// leading: Image.asset('images/C11_Logo-png.png', fit: BoxFit.cover),
// title: Text('Report.it', style: TextStyle(color: Colors.black)),
// // IconButton(
// // icon: const Icon(Icons.arrow_back, color: Colors.black),
// // onPressed: () {}),
// //title: const Text('Go back', style: TextStyle(color: Colors.black)),
// elevation: 0,
// backgroundColor: Colors.transparent,
// systemOverlayStyle: SystemUiOverlayStyle.dark,
// actions: [
// IconButton(
// onPressed: () {},
// icon: Icon(Iconsax.logout, color: Colors.black))
// ]),
// body: Pagine[_selectedItemPosition],
// bottomNavigationBar: SnakeNavigationBar.color(
// // height: 80,
// behaviour: snakeBarStyle,
// snakeShape: snakeShape,
// shape: bottomBarShape,
// padding: padding,

// ///configuration for SnakeNavigationBar.color
// snakeViewColor: selectedColor,
// selectedItemColor:
// snakeShape == SnakeShape.indicator ? selectedColor : null,
// unselectedItemColor: unselectedColor,

// ///configuration for SnakeNavigationBar.gradient
// // snakeViewGradient: selectedGradient,
// // selectedItemGradient: snakeShape == SnakeShape.indicator ? selectedGradient : null,
// // unselectedItemGradient: unselectedGradient,

// showUnselectedLabels: showUnselectedLabels,
// showSelectedLabels: showSelectedLabels,

// currentIndex: _selectedItemPosition,
// onTap: (index) => setState(() => _selectedItemPosition = index),
// items: const [
// BottomNavigationBarItem(
// icon: Icon(Iconsax.document_normal),
// label: 'denunce',
// ),
// BottomNavigationBarItem(
// icon: Icon(Iconsax.people),
// label: 'forum',
// ),
// BottomNavigationBarItem(
// icon: Icon(Iconsax.info_circle),
// label: 'informazioni',
// ),
// BottomNavigationBarItem(
// icon: Icon(Iconsax.map),
// label: 'mappa',
// ),
// BottomNavigationBarItem(
// icon: Icon(Iconsax.health),
// label: 'psicologo',
// )
// ],
// selectedLabelStyle: const TextStyle(fontSize: 14),
// unselectedLabelStyle: const TextStyle(fontSize: 10),
// ),
// );
// }
// }
22 changes: 22 additions & 0 deletions lib/presentation/pages/FAQinformativa_page.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/container.dart';
import 'package:flutter/src/widgets/framework.dart';

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

@override
Widget build(BuildContext context) {
return AnimatedContainer(
color: const Color.fromRGBO(255, 254, 248, 1),
duration: const Duration(seconds: 1),
child: ListView(children: [
Text(
'FAQ',
style: Theme.of(context).textTheme.headline1,
),
]),
);
}
}
Loading