瀏覽代碼

First Commit

c90Beretta 2 月之前
父節點
當前提交
d492881b8b

+ 3 - 0
.fvmrc

@@ -0,0 +1,3 @@
+{
+  "flutter": "3.16.9"
+}

+ 3 - 0
.gitignore

@@ -41,3 +41,6 @@ app.*.map.json
 /android/app/debug
 /android/app/profile
 /android/app/release
+
+# FVM Version Cache
+.fvm/

+ 3 - 0
.vscode/settings.json

@@ -0,0 +1,3 @@
+{
+  "dart.flutterSdkPath": ".fvm/versions/3.16.9"
+}

+ 5 - 5
android/app/build.gradle

@@ -23,8 +23,8 @@ if (flutterVersionName == null) {
 }
 
 android {
-    namespace "com.example.turquessa_mesas_hoster"
-    compileSdkVersion flutter.compileSdkVersion
+    namespace "com.turquessacoffee.hoster"
+    compileSdkVersion 34
     ndkVersion flutter.ndkVersion
 
     compileOptions {
@@ -42,11 +42,11 @@ android {
 
     defaultConfig {
         // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
-        applicationId "com.example.turquessa_mesas_hoster"
+        applicationId "com.turquessacoffee.hoster"
         // You can update the following values to match your application needs.
         // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
-        minSdkVersion flutter.minSdkVersion
-        targetSdkVersion flutter.targetSdkVersion
+        minSdkVersion 24
+        targetSdkVersion 33
         versionCode flutterVersionCode.toInteger()
         versionName flutterVersionName
     }

+ 1 - 1
android/app/src/main/kotlin/com/example/turquessa_mesas_hoster/MainActivity.kt

@@ -1,4 +1,4 @@
-package com.example.turquessa_mesas_hoster
+package com.turquessacoffee.hoster
 
 import io.flutter.embedding.android.FlutterActivity
 

+ 1 - 0
ios/Flutter/Debug.xcconfig

@@ -1 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
 #include "Generated.xcconfig"

+ 1 - 0
ios/Flutter/Release.xcconfig

@@ -1 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
 #include "Generated.xcconfig"

+ 44 - 0
ios/Podfile

@@ -0,0 +1,44 @@
+# Uncomment this line to define a global platform for your project
+# platform :ios, '12.0'
+
+# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
+ENV['COCOAPODS_DISABLE_STATS'] = 'true'
+
+project 'Runner', {
+  'Debug' => :debug,
+  'Profile' => :release,
+  'Release' => :release,
+}
+
+def flutter_root
+  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
+  unless File.exist?(generated_xcode_build_settings_path)
+    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
+  end
+
+  File.foreach(generated_xcode_build_settings_path) do |line|
+    matches = line.match(/FLUTTER_ROOT\=(.*)/)
+    return matches[1].strip if matches
+  end
+  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
+end
+
+require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
+
+flutter_ios_podfile_setup
+
+target 'Runner' do
+  use_frameworks!
+  use_modular_headers!
+
+  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
+  target 'RunnerTests' do
+    inherit! :search_paths
+  end
+end
+
+post_install do |installer|
+  installer.pods_project.targets.each do |target|
+    flutter_additional_ios_build_settings(target)
+  end
+end

+ 48 - 11
lib/mvvm/views/home/home_screen.dart

@@ -1,8 +1,8 @@
 import 'package:flutter/material.dart';
+import 'package:turquessa_mesas_hoster/utils/widgets/custom_appbar.dart';
 import '../../../utils/widgets/widgets.dart';
 import 'package:flutter/material.dart';
 import 'package:provider/provider.dart';
-
 import '../../../utils/themes.dart';
 
 class HomeScreen extends StatefulWidget {
@@ -20,20 +20,57 @@ class Formulario extends State<HomeScreen> {
 
   @override
   Widget build(BuildContext context) {
+    var _selectedIndex;
     return Scaffold(
       backgroundColor: Colors.grey.shade200,
       appBar: AppBar(
-        title: Text(
-          'Inicio',
-          style: TextStyle(color: AppTheme.secondary),
-        ),
-        iconTheme: IconThemeData(color: AppTheme.secondary),
+        title: const CustomAppbar(),
       ),
-      body: const Center(
-        child: Image(
-          image: AssetImage('assets/logo.png'),
-          height: 200,
-        ),
+      body: Row(
+        children: [
+          NavigationRail(
+            backgroundColor: Color.fromARGB(255, 25, 30, 41),
+            selectedIndex: _selectedIndex,
+            onDestinationSelected: (int index) {
+              setState(() {
+                _selectedIndex = index;
+              });
+            },
+            labelType: NavigationRailLabelType.all,
+            destinations: const [
+              NavigationRailDestination(
+                icon: Icon(Icons.home, color: Colors.white),
+                selectedIcon: Icon(Icons.home_filled),
+                label: Text('Inicio'),
+              ),
+              NavigationRailDestination(
+                icon: Icon(Icons.search),
+                selectedIcon: Icon(
+                  Icons.search_rounded,
+                  color: Colors.white,
+                ),
+                label: Text('Buscar'),
+              ),
+              NavigationRailDestination(
+                icon: Icon(Icons.settings),
+                selectedIcon: Icon(Icons.settings_rounded, color: Colors.white),
+                label: Text('Ajustes'),
+              ),
+            ],
+          ),
+          const Expanded(
+            child: Center(
+                child: Padding(padding: EdgeInsets.symmetric(vertical: 10)
+                    // child: GridView,
+                    )
+
+                // child: Image(
+                //   image: AssetImage('assets/logo.png'),
+                //   height: 400,
+                // ),
+                ),
+          ),
+        ],
       ),
     );
   }

+ 42 - 0
lib/utils/widgets/custom_appbar.dart

@@ -0,0 +1,42 @@
+import 'package:flutter/material.dart';
+
+class CustomAppbar extends StatefulWidget {
+  const CustomAppbar({super.key});
+
+  @override
+  State<CustomAppbar> createState() => _CustomAppbarState();
+}
+
+class _CustomAppbarState extends State<CustomAppbar> {
+  @override
+  Widget build(BuildContext context) {
+    return Row(
+      children: [
+        Image.asset(
+          'assets/logo.png',
+          height: 40,
+        ),
+        const SizedBox(width: 10),
+        const SizedBox(width: 10),
+        DropdownButton(
+            hint: const Text(
+              "Mesas Interiores",
+              style:
+                  TextStyle(color: Colors.black, fontWeight: FontWeight.bold),
+            ),
+            icon: const Icon(Icons.arrow_drop_down),
+            items: const [
+              DropdownMenuItem(
+                value: "ES",
+                child: Text("Palomeras"),
+              ),
+              DropdownMenuItem(
+                value: "EN",
+                child: Text("Sombrillera"),
+              ),
+            ],
+            onChanged: (e) => {})
+      ],
+    );
+  }
+}

+ 1 - 0
macos/Flutter/Flutter-Debug.xcconfig

@@ -1 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
 #include "ephemeral/Flutter-Generated.xcconfig"

+ 1 - 0
macos/Flutter/Flutter-Release.xcconfig

@@ -1 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
 #include "ephemeral/Flutter-Generated.xcconfig"

+ 43 - 0
macos/Podfile

@@ -0,0 +1,43 @@
+platform :osx, '10.14'
+
+# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
+ENV['COCOAPODS_DISABLE_STATS'] = 'true'
+
+project 'Runner', {
+  'Debug' => :debug,
+  'Profile' => :release,
+  'Release' => :release,
+}
+
+def flutter_root
+  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
+  unless File.exist?(generated_xcode_build_settings_path)
+    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
+  end
+
+  File.foreach(generated_xcode_build_settings_path) do |line|
+    matches = line.match(/FLUTTER_ROOT\=(.*)/)
+    return matches[1].strip if matches
+  end
+  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
+end
+
+require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
+
+flutter_macos_podfile_setup
+
+target 'Runner' do
+  use_frameworks!
+  use_modular_headers!
+
+  flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
+  target 'RunnerTests' do
+    inherit! :search_paths
+  end
+end
+
+post_install do |installer|
+  installer.pods_project.targets.each do |target|
+    flutter_additional_macos_build_settings(target)
+  end
+end