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

mindmend-branch2 #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
Binary file modified assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions lib/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:bhagwat_gita_app/contact_us.dart';
import 'package:bhagwat_gita_app/councellers.dart';
import 'package:bhagwat_gita_app/pdf.dart';
import 'package:flutter/material.dart';
// import 'package:alan_voice/alan_voice.dart';
import 'package:carousel_slider/carousel_slider.dart';
import 'package:youtube_player_flutter/youtube_player_flutter.dart';
import 'package:webview_flutter/webview_flutter.dart';
Expand Down Expand Up @@ -60,6 +61,17 @@ class _HomePageState extends State<HomePage> {

int _selectedIndex = 0;

// _HomePageState() {
// /// Init Alan Button with project key from Alan AI Studio
// AlanVoice.addButton(
// "aa52753a16404b7fcf69d3be5eed61172e956eca572e1d8b807a3e2338fdd0dc/stage");

// /// Handle commands from Alan AI Studio
// AlanVoice.onCommand.add((command) {
// debugPrint("got new command ${command.toString()}");
// });
// }

@override
Widget build(BuildContext context) {
return Scaffold(
Expand All @@ -72,6 +84,13 @@ class _HomePageState extends State<HomePage> {
color: Colors.deepPurple,
),
),
// actions: [
// IconButton(
// icon: const Icon(Icons.mic),
// onPressed: () {
// },
// ),
// ],
),
body: SafeArea(
child: Padding(
Expand Down
40 changes: 36 additions & 4 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
// import 'package:bhagwat_gita_app/home_page.dart';
import 'package:bhagwat_gita_app/home_page.dart';
// import 'package:bhagwat_gita_app/sign_and_login.dart';s
import 'package:flutter/material.dart';
import 'package:animated_splash_screen/animated_splash_screen.dart';
import 'package:palette_generator/palette_generator.dart';
import 'package:bhagwat_gita_app/home_page.dart';
// import 'package:alan_voice/alan_voice.dart';

void main() {
// AlanVoice.addButton(
// "aa52753a16404b7fcf69d3be5eed61172e956eca572e1d8b807a3e2338fdd0dc/stage",
// buttonAlign: AlanVoice.BUTTON_ALIGN_LEFT,
// );
runApp(const MyApp());
}

Expand All @@ -19,7 +24,34 @@ class MyApp extends StatelessWidget {
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: const HomePage(),
home: FutureBuilder<PaletteGenerator>(
future: _generatePalette(context),
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return const CircularProgressIndicator();
} else if (snapshot.hasError || snapshot.data == null) {
return const Text('Error loading palette');
} else {
final dominantColor = snapshot.data!.dominantColor?.color;

return AnimatedSplashScreen(
splash: Image.asset('assets/logo.png',
width: 800.0, // Adjust the width as needed
height: 800.0, // Adjust the height as needed
fit: BoxFit.contain), // Optional, adjust the fit as needed
nextScreen: const HomePage(),
splashTransition: SplashTransition.rotationTransition,
backgroundColor: dominantColor ?? Colors.deepPurple,
);
}
},
),
);
}

Future<PaletteGenerator> _generatePalette(BuildContext context) async {
return await PaletteGenerator.fromImageProvider(
AssetImage('assets/logo.png'),
);
}
}
11 changes: 2 additions & 9 deletions lib/pdf.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:syncfusion_flutter_pdfviewer/pdfviewer.dart';
import 'package:share/share.dart';
import 'dart:io';
// import 'package:share/share.dart';
// import 'dart:io';

class YourPDFScreen extends StatelessWidget {
@override
Expand Down Expand Up @@ -37,11 +37,4 @@ class PDFViewer extends StatelessWidget {
),
);
}

// void _sharePDF(BuildContext context, String pdfPath) {
// final RenderBox box = context.findRenderObject() as RenderBox;
// Share.shareFiles([pdfPath],
// text: 'Check out this PDF!',
// sharePositionOrigin: box.localToGlobal(Offset.zero) & box.size);
// }
}
2 changes: 2 additions & 0 deletions macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Foundation

import audioplayers_darwin
import device_info_plus
import package_info
import package_info_plus
import path_provider_foundation
import shared_preferences_foundation
Expand All @@ -20,6 +21,7 @@ import zego_zim
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
AudioplayersDarwinPlugin.register(with: registry.registrar(forPlugin: "AudioplayersDarwinPlugin"))
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin"))
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
Expand Down
56 changes: 48 additions & 8 deletions pubspec.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
alan_voice:
dependency: "direct main"
description:
name: alan_voice
sha256: df776b4e6408c2cfafb51add7db92381bb8bfd3999172a826455db21bd83e9da
url: "https://pub.dev"
source: hosted
version: "4.4.0"
animated_splash_screen:
dependency: "direct main"
description:
name: animated_splash_screen
sha256: f45634db6ec4e8cf034c53e03f3bd83898a16fe3c9286bf5510b6831dfcf2124
url: "https://pub.dev"
source: hosted
version: "1.3.0"
archive:
dependency: transitive
description:
Expand Down Expand Up @@ -448,6 +464,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.0"
package_info:
dependency: transitive
description:
name: package_info
sha256: "6c07d9d82c69e16afeeeeb6866fe43985a20b3b50df243091bfc4a4ad2b03b75"
url: "https://pub.dev"
source: hosted
version: "2.0.2"
package_info_plus:
dependency: transitive
description:
Expand All @@ -464,6 +488,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.1"
page_transition:
dependency: "direct main"
description:
name: page_transition
sha256: dee976b1f23de9bbef5cd512fe567e9f6278caee11f5eaca9a2115c19dc49ef6
url: "https://pub.dev"
source: hosted
version: "2.1.0"
palette_generator:
dependency: "direct main"
description:
name: palette_generator
sha256: eb7082b4b97487ebc65b3ad3f6f0b7489b96e76840381ed0e06a46fe7ffd4068
url: "https://pub.dev"
source: hosted
version: "0.3.3+3"
path:
dependency: "direct main"
description:
Expand Down Expand Up @@ -689,18 +729,18 @@ packages:
dependency: "direct main"
description:
name: sqflite
sha256: "591f1602816e9c31377d5f008c2d9ef7b8aca8941c3f89cc5fd9d84da0c38a9a"
sha256: a9016f495c927cb90557c909ff26a6d92d9bd54fc42ba92e19d4e79d61e798c6
url: "https://pub.dev"
source: hosted
version: "2.3.0"
version: "2.3.2"
sqflite_common:
dependency: transitive
description:
name: sqflite_common
sha256: bb4738f15b23352822f4c42a531677e5c6f522e079461fd240ead29d8d8a54a6
sha256: "28d8c66baee4968519fb8bd6cdbedad982d6e53359091f0b74544a9f32ec72d5"
url: "https://pub.dev"
source: hosted
version: "2.5.0+2"
version: "2.5.3"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -841,10 +881,10 @@ packages:
dependency: "direct main"
description:
name: url_launcher
sha256: d25bb0ca00432a5e1ee40e69c36c85863addf7cc45e433769d61bed3fe81fd96
sha256: c512655380d241a337521703af62d2c122bf7b77a46ff7dd750092aa9433499c
url: "https://pub.dev"
source: hosted
version: "6.2.3"
version: "6.2.4"
url_launcher_android:
dependency: transitive
description:
Expand Down Expand Up @@ -1065,10 +1105,10 @@ packages:
dependency: transitive
description:
name: zego_uikit
sha256: "5ff993a82c1eab398f3e10f9fbe8bd64cdd216c60eda1cd40afb0f7ec8e8f339"
sha256: "1e1e4ab7429f37fb9b2b9a2e90b08f789aa81902d01796d9df70af6a213e157e"
url: "https://pub.dev"
source: hosted
version: "2.18.0"
version: "2.18.2"
zego_uikit_prebuilt_call:
dependency: "direct main"
description:
Expand Down
8 changes: 5 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ dependencies:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
# chat_gpt_sdk:
# git:
# url: https://github.com/iampawan/Flutter-ChatGPT.git
carousel_slider: ^4.2.1
youtube_player_flutter: ^8.1.2
webview_flutter: ^2.0.14
Expand All @@ -44,6 +41,10 @@ dependencies:
syncfusion_flutter_pdfviewer: ^24.1.47
flutter_launcher_icons: ^0.13.1
share: ^2.0.4
animated_splash_screen: ^1.3.0
page_transition: ^2.1.0
palette_generator: ^0.3.3+3
alan_voice: 4.4.0
# twilio_dart_api: ^0.13.5


Expand Down Expand Up @@ -79,6 +80,7 @@ flutter:
# To add assets to your application, add an assets section, like this:
assets:
- assets/Bhagavad_Gita.pdf
- assets/logo.png
# - images/a_dot_ham.jpeg

# An image asset can refer to one or more resolution-specific "variants", see
Expand Down