Skip to content

Commit

Permalink
ajustado navigador e removido firedstore por enquanto
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonardoMessaWagner committed Dec 9, 2023
1 parent 5700d56 commit 60dadbc
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 54 deletions.
16 changes: 16 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
]
}
],
"version": 4
}
11 changes: 0 additions & 11 deletions lib/database/firestore_db.dart

This file was deleted.

23 changes: 13 additions & 10 deletions lib/paginas/cad_casas.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ class CadCasas extends StatefulWidget {
}

class _CadCasasState extends State<CadCasas> {
final _formKey = GlobalKey<FormState>();
final TextEditingController _ruaController = TextEditingController();
final TextEditingController _numeroController = TextEditingController();
final TextEditingController _cepController = TextEditingController();
bool? _temGaragem = false;
bool? _temPiscina = false;
@override
Widget build(BuildContext context) {
final _formKey = GlobalKey<FormState>();
final TextEditingController _ruaController = TextEditingController();
final TextEditingController _numeroController = TextEditingController();
final TextEditingController _cepController = TextEditingController();
bool? _temGaragem = false;
bool? _temPiscina = false;

return Scaffold(
appBar: AppBar(
title: Text('Cadastro de Casas'),
Expand Down Expand Up @@ -59,16 +58,20 @@ class _CadCasasState extends State<CadCasas> {
},
),
CheckboxListTile(
title: Text('Tem Garagem'),
title: const Text('Tem Garagem'),
value: _temGaragem,
onChanged: (bool? value) {},
onChanged: (bool? value) {
setState(() {
_temGaragem = value!;
});
},
),
CheckboxListTile(
title: Text('Tem Piscina'),
value: _temPiscina,
onChanged: (bool? value) {
setState(() {
_temPiscina = value;
_temPiscina = value!;
});

;
Expand Down
6 changes: 5 additions & 1 deletion lib/paginas/home.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_trabalho/paginas/appbar.dart';
import 'package:flutter_trabalho/paginas/cad_casas.dart';
import 'package:flutter_trabalho/servicos/auth.dart';
import 'package:provider/provider.dart';

Expand Down Expand Up @@ -38,7 +39,10 @@ class _HomeState extends State<Home> {
ListTile(
leading: const Icon(Icons.house),
title: const Text('Cadastrar Casas'),
onTap: () {},
onTap: () {
Navigator.of(context).push(
MaterialPageRoute(builder: (context) => const CadCasas()));
},
),
ListTile(
leading: const Icon(Icons.exit_to_app),
Expand Down
2 changes: 0 additions & 2 deletions macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
import FlutterMacOS
import Foundation

import cloud_firestore
import firebase_auth
import firebase_core

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FLTFirebaseFirestorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseFirestorePlugin"))
FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin"))
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
}
24 changes: 0 additions & 24 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -41,30 +41,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.1.1"
cloud_firestore:
dependency: "direct main"
description:
name: cloud_firestore
sha256: "50e33a5cd62f7ed0e8290802a7e68e090d27738f65256977162c127303ad82ea"
url: "https://pub.dev"
source: hosted
version: "4.13.5"
cloud_firestore_platform_interface:
dependency: transitive
description:
name: cloud_firestore_platform_interface
sha256: dedbd776c04429f85726e5cfb6f929d8405da241ceec32baa7d31b7d062dad53
url: "https://pub.dev"
source: hosted
version: "6.0.9"
cloud_firestore_web:
dependency: transitive
description:
name: cloud_firestore_web
sha256: fd60d31f4eb104295256edc2e0bee631dc2b3283c5087701c513bfa9f27b711a
url: "https://pub.dev"
source: hosted
version: "3.8.9"
collection:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ dependencies:
firebase_core: ^2.24.1
firebase_auth: ^4.15.1
provider: ^6.1.1
cloud_firestore: ^4.13.5


dev_dependencies:
flutter_test:
Expand Down
3 changes: 2 additions & 1 deletion test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@

import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_trabalho/aplicativo.dart';

import 'package:flutter_trabalho/main.dart';

void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(const MyApp());
await tester.pumpWidget(const Aplicativo());

// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);
Expand Down
3 changes: 0 additions & 3 deletions windows/flutter/generated_plugin_registrant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@

#include "generated_plugin_registrant.h"

#include <cloud_firestore/cloud_firestore_plugin_c_api.h>
#include <firebase_auth/firebase_auth_plugin_c_api.h>
#include <firebase_core/firebase_core_plugin_c_api.h>

void RegisterPlugins(flutter::PluginRegistry* registry) {
CloudFirestorePluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("CloudFirestorePluginCApi"));
FirebaseAuthPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FirebaseAuthPluginCApi"));
FirebaseCorePluginCApiRegisterWithRegistrar(
Expand Down
1 change: 0 additions & 1 deletion windows/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

list(APPEND FLUTTER_PLUGIN_LIST
cloud_firestore
firebase_auth
firebase_core
)
Expand Down

0 comments on commit 60dadbc

Please sign in to comment.