QOL: Mzansi AI Chat Look and Feel pt2 & Startup question
This commit is contained in:
@@ -17,6 +17,11 @@
|
|||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
|
||||||
android:maxSdkVersion="32"
|
android:maxSdkVersion="32"
|
||||||
tools:replace="android:maxSdkVersion" />
|
tools:replace="android:maxSdkVersion" />
|
||||||
|
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
|
||||||
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
|
<uses-permission android:name="android.permission.BLUETOOTH"/>
|
||||||
|
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
|
||||||
|
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:label="MIH"
|
android:label="MIH"
|
||||||
@@ -101,5 +106,8 @@
|
|||||||
<intent>
|
<intent>
|
||||||
<action android:name="android.intent.action.TTS_SERVICE" />
|
<action android:name="android.intent.action.TTS_SERVICE" />
|
||||||
</intent>
|
</intent>
|
||||||
|
<intent>
|
||||||
|
<action android:name="android.speech.RecognitionService" />
|
||||||
|
</intent>
|
||||||
</queries>
|
</queries>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>NSMicrophoneUsageDescription</key>
|
||||||
|
<string>This app needs access to your microphone to enable voice input for the chat.</string>
|
||||||
|
<key>NSSpeechRecognitionUsageDescription</key>
|
||||||
|
<string>This app uses speech recognition to convert your voice messages into text.</string>
|
||||||
<key>SKAdNetworkItems</key>
|
<key>SKAdNetworkItems</key>
|
||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_ai_toolkit/flutter_ai_toolkit.dart';
|
import 'package:flutter_ai_toolkit/flutter_ai_toolkit.dart';
|
||||||
|
import 'package:flutter_markdown_plus/flutter_markdown_plus.dart';
|
||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_providers/ollama_provider.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_providers/ollama_provider.dart';
|
||||||
@@ -63,6 +64,75 @@ class MzansiAiProvider extends ChangeNotifier {
|
|||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void clearStartUpQuestion() {
|
||||||
|
startUpQuestion = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
MarkdownStyleSheet getLlmChatMarkdownStyle(BuildContext context) {
|
||||||
|
TextStyle body = TextStyle(
|
||||||
|
color: MihColors.getPrimaryColor(
|
||||||
|
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
);
|
||||||
|
TextStyle heading1 = TextStyle(
|
||||||
|
color: MihColors.getPrimaryColor(
|
||||||
|
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||||
|
fontSize: 24,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
);
|
||||||
|
TextStyle heading2 = TextStyle(
|
||||||
|
color: MihColors.getPrimaryColor(
|
||||||
|
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
);
|
||||||
|
TextStyle code = TextStyle(
|
||||||
|
color: MihColors.getSecondaryColor(
|
||||||
|
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
);
|
||||||
|
BoxDecoration codeBlock = BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(10),
|
||||||
|
topRight: Radius.circular(10),
|
||||||
|
bottomLeft: Radius.circular(10),
|
||||||
|
bottomRight: Radius.circular(10),
|
||||||
|
),
|
||||||
|
color: MihColors.getHighlightColor(
|
||||||
|
MzansiInnovationHub.of(context)!.theme.mode != "Dark"),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: Colors.black.withAlpha(76),
|
||||||
|
blurRadius: 8,
|
||||||
|
offset: Offset(2, 2),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
return MarkdownStyleSheet(
|
||||||
|
a: body,
|
||||||
|
blockquote: body,
|
||||||
|
checkbox: body,
|
||||||
|
del: body,
|
||||||
|
em: body.copyWith(fontStyle: FontStyle.italic),
|
||||||
|
h1: heading1,
|
||||||
|
h2: heading2,
|
||||||
|
h3: body.copyWith(fontWeight: FontWeight.bold),
|
||||||
|
h4: body,
|
||||||
|
h5: body,
|
||||||
|
h6: body,
|
||||||
|
listBullet: body,
|
||||||
|
img: body,
|
||||||
|
strong: body.copyWith(fontWeight: FontWeight.bold),
|
||||||
|
p: body,
|
||||||
|
tableBody: body,
|
||||||
|
tableHead: body,
|
||||||
|
code: code,
|
||||||
|
codeblockDecoration: codeBlock,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
LlmChatViewStyle? getChatStyle(BuildContext context) {
|
LlmChatViewStyle? getChatStyle(BuildContext context) {
|
||||||
return LlmChatViewStyle(
|
return LlmChatViewStyle(
|
||||||
backgroundColor: MihColors.getPrimaryColor(
|
backgroundColor: MihColors.getPrimaryColor(
|
||||||
@@ -153,6 +223,7 @@ class MzansiAiProvider extends ChangeNotifier {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
markdownStyle: getLlmChatMarkdownStyle(context),
|
||||||
),
|
),
|
||||||
// User Chat Style
|
// User Chat Style
|
||||||
userMessageStyle: UserMessageStyle(
|
userMessageStyle: UserMessageStyle(
|
||||||
@@ -241,7 +312,8 @@ class MzansiAiProvider extends ChangeNotifier {
|
|||||||
textStyle: TextStyle(
|
textStyle: TextStyle(
|
||||||
color: MihColors.getPrimaryColor(
|
color: MihColors.getPrimaryColor(
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||||
)),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import 'dart:convert';
|
|||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter_ai_toolkit/flutter_ai_toolkit.dart';
|
import 'package:flutter_ai_toolkit/flutter_ai_toolkit.dart';
|
||||||
|
import 'package:ken_logger/ken_logger.dart';
|
||||||
import 'package:ollama_dart/ollama_dart.dart';
|
import 'package:ollama_dart/ollama_dart.dart';
|
||||||
|
|
||||||
class OllamaProvider extends LlmProvider with ChangeNotifier {
|
class OllamaProvider extends LlmProvider with ChangeNotifier {
|
||||||
@@ -40,16 +41,19 @@ class OllamaProvider extends LlmProvider with ChangeNotifier {
|
|||||||
String prompt, {
|
String prompt, {
|
||||||
Iterable<Attachment> attachments = const [],
|
Iterable<Attachment> attachments = const [],
|
||||||
}) async* {
|
}) async* {
|
||||||
|
KenLogger.success("sendMessageStream called with: $prompt");
|
||||||
final userMessage = ChatMessage.user(prompt, attachments);
|
final userMessage = ChatMessage.user(prompt, attachments);
|
||||||
final llmMessage = ChatMessage.llm();
|
final llmMessage = ChatMessage.llm();
|
||||||
_history.addAll([userMessage, llmMessage]);
|
_history.addAll([userMessage, llmMessage]);
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
|
KenLogger.success("History after adding messages: ${_history.length}");
|
||||||
final messages = _mapToOllamaMessages(_history);
|
final messages = _mapToOllamaMessages(_history);
|
||||||
final stream = _generateStream(messages);
|
final stream = _generateStream(messages);
|
||||||
yield* stream.map((chunk) {
|
yield* stream.map((chunk) {
|
||||||
llmMessage.append(chunk);
|
llmMessage.append(chunk);
|
||||||
return chunk;
|
return chunk;
|
||||||
});
|
});
|
||||||
|
KenLogger.success("Stream completed for: $prompt");
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -286,11 +286,11 @@ class _MihPersonalHomeState extends State<MihPersonalHome>
|
|||||||
hintColor: MihColors.getPrimaryColor(
|
hintColor: MihColors.getPrimaryColor(
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||||
onPrefixIconTap: () {
|
onPrefixIconTap: () {
|
||||||
|
if (searchController.text.isNotEmpty) {
|
||||||
mzansiAiProvider
|
mzansiAiProvider
|
||||||
.setStartUpQuestion(searchController.text);
|
.setStartUpQuestion(searchController.text);
|
||||||
context.goNamed(
|
}
|
||||||
"mzansiAi",
|
context.goNamed("mzansiAi");
|
||||||
);
|
|
||||||
searchController.clear();
|
searchController.clear();
|
||||||
},
|
},
|
||||||
searchFocusNode: _searchFocusNode,
|
searchFocusNode: _searchFocusNode,
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_
|
|||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_action.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_action.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tools.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tools.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mzansi_ai_provider.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mzansi_ai_provider.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_packages/mzansi_ai/package_tools/ai_chat.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_packages/mzansi_ai/package_tools/mih_ai_chat.dart';
|
import 'package:mzansi_innovation_hub/mih_packages/mzansi_ai/package_tools/mih_ai_chat.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
@@ -37,9 +36,9 @@ class _MzansiAiState extends State<MzansiAi> {
|
|||||||
temp[const Icon(Icons.chat)] = () {
|
temp[const Icon(Icons.chat)] = () {
|
||||||
context.read<MzansiAiProvider>().setToolIndex(0);
|
context.read<MzansiAiProvider>().setToolIndex(0);
|
||||||
};
|
};
|
||||||
temp[const Icon(Icons.chat)] = () {
|
// temp[const Icon(Icons.chat)] = () {
|
||||||
context.read<MzansiAiProvider>().setToolIndex(1);
|
// context.read<MzansiAiProvider>().setToolIndex(1);
|
||||||
};
|
// };
|
||||||
|
|
||||||
return MihPackageTools(
|
return MihPackageTools(
|
||||||
tools: temp,
|
tools: temp,
|
||||||
@@ -49,7 +48,7 @@ class _MzansiAiState extends State<MzansiAi> {
|
|||||||
|
|
||||||
List<Widget> getToolBody() {
|
List<Widget> getToolBody() {
|
||||||
List<Widget> toolBodies = [
|
List<Widget> toolBodies = [
|
||||||
AiChat(),
|
// AiChat(),
|
||||||
MihAiChat(),
|
MihAiChat(),
|
||||||
];
|
];
|
||||||
return toolBodies;
|
return toolBodies;
|
||||||
@@ -58,7 +57,7 @@ class _MzansiAiState extends State<MzansiAi> {
|
|||||||
List<String> getToolTitle() {
|
List<String> getToolTitle() {
|
||||||
List<String> toolTitles = [
|
List<String> toolTitles = [
|
||||||
"Ask Mzansi",
|
"Ask Mzansi",
|
||||||
"New Chat",
|
// "New Chat",
|
||||||
];
|
];
|
||||||
return toolTitles;
|
return toolTitles;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
||||||
import 'package:gpt_markdown/gpt_markdown.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mzansi_ai_provider.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_providers/mzansi_ai_provider.dart';
|
||||||
@@ -221,8 +220,21 @@ class _AiChatState extends State<AiChat> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
|
// SelectionArea(
|
||||||
|
// child: GptMarkdown(
|
||||||
|
// snapshot.requireData,
|
||||||
|
// textAlign: TextAlign.left,
|
||||||
|
// style: TextStyle(
|
||||||
|
// color: MihColors.getSecondaryColor(
|
||||||
|
// MzansiInnovationHub.of(context)!.theme.mode ==
|
||||||
|
// "Dark"),
|
||||||
|
// fontSize: _chatFrontSize,
|
||||||
|
// fontWeight: FontWeight.bold,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
SelectionArea(
|
SelectionArea(
|
||||||
child: GptMarkdown(
|
child: Text(
|
||||||
snapshot.requireData,
|
snapshot.requireData,
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|||||||
@@ -124,54 +124,68 @@ class _MihAiChatState extends State<MihAiChat> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> initTts() async {
|
Future<void> initTts() async {
|
||||||
List<Map> _voices = [];
|
|
||||||
List<String> _voicesString = [];
|
|
||||||
// await _flutterTts.setLanguage("en-US");
|
|
||||||
await _flutterTts.setSpeechRate(1);
|
|
||||||
_flutterTts.getVoices.then(
|
|
||||||
(data) {
|
|
||||||
try {
|
try {
|
||||||
_voices = List<Map>.from(data);
|
await _flutterTts.setSpeechRate(1);
|
||||||
|
// await _flutterTts.setLanguage("en-US");
|
||||||
|
|
||||||
setState(() {
|
// Safer voice selection with error handling
|
||||||
_voices = _voices
|
_flutterTts.getVoices.then((data) {
|
||||||
.where(
|
try {
|
||||||
(_voice) => _voice["name"].toLowerCase().contains("en-us"))
|
final voices = List<Map>.from(data);
|
||||||
.toList();
|
final englishVoices = voices.where((voice) {
|
||||||
_voicesString =
|
final name = voice["name"]?.toString().toLowerCase() ?? '';
|
||||||
_voices.map((_voice) => _voice["name"] as String).toList();
|
final locale = voice["locale"]?.toString().toLowerCase() ?? '';
|
||||||
_voicesString.sort();
|
return name.contains("en-us") || locale.contains("en_us");
|
||||||
_flutterTts.setVoice(
|
}).toList();
|
||||||
{
|
|
||||||
"name": _voicesString.first,
|
if (englishVoices.isNotEmpty) {
|
||||||
"locale": _voices
|
// Use the first available English voice
|
||||||
.where((_voice) =>
|
_flutterTts.setVoice({"name": englishVoices.first["name"]});
|
||||||
_voice["name"].contains(_voicesString.first))
|
}
|
||||||
.first["locale"]
|
// If no voices found, use default
|
||||||
},
|
} catch (e) {
|
||||||
);
|
KenLogger.error("Error setting TTS voice: $e");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print(e);
|
KenLogger.error("Error initializing TTS: $e");
|
||||||
}
|
}
|
||||||
},
|
|
||||||
);
|
|
||||||
_flutterTts.setStartHandler(() {
|
_flutterTts.setStartHandler(() {
|
||||||
|
if (mounted) {
|
||||||
setState(() {
|
setState(() {
|
||||||
ttsOn = true;
|
ttsOn = true;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
_flutterTts.setCompletionHandler(() {
|
_flutterTts.setCompletionHandler(() {
|
||||||
|
if (mounted) {
|
||||||
setState(() {
|
setState(() {
|
||||||
ttsOn = false;
|
ttsOn = false;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
_flutterTts.setErrorHandler((message) {
|
_flutterTts.setErrorHandler((message) {
|
||||||
|
if (mounted) {
|
||||||
setState(() {
|
setState(() {
|
||||||
ttsOn = false;
|
ttsOn = false;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void initStartQuestion() {
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||||
|
final mzansiAiProvider = context.read<MzansiAiProvider>();
|
||||||
|
final startQuestion = mzansiAiProvider.startUpQuestion;
|
||||||
|
if (startQuestion != null && startQuestion.isNotEmpty) {
|
||||||
|
final stream =
|
||||||
|
mzansiAiProvider.ollamaProvider.sendMessageStream(startQuestion);
|
||||||
|
stream.listen((chunk) {});
|
||||||
|
mzansiAiProvider.clearStartUpQuestion();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -179,6 +193,7 @@ class _MihAiChatState extends State<MihAiChat> {
|
|||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
initTts();
|
initTts();
|
||||||
|
initStartQuestion();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -192,6 +207,13 @@ class _MihAiChatState extends State<MihAiChat> {
|
|||||||
return Consumer<MzansiAiProvider>(
|
return Consumer<MzansiAiProvider>(
|
||||||
builder: (BuildContext context, MzansiAiProvider mzansiAiProvider,
|
builder: (BuildContext context, MzansiAiProvider mzansiAiProvider,
|
||||||
Widget? child) {
|
Widget? child) {
|
||||||
|
// final startupQuestion = mzansiAiProvider.startUpQuestion;
|
||||||
|
// if (startupQuestion != null) {
|
||||||
|
// WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
|
// mzansiAiProvider.ollamaProvider.sendMessageStream(startupQuestion);
|
||||||
|
// mzansiAiProvider.setStartUpQuestion(null);
|
||||||
|
// });
|
||||||
|
// }
|
||||||
bool hasHistory = mzansiAiProvider.ollamaProvider.history.isNotEmpty;
|
bool hasHistory = mzansiAiProvider.ollamaProvider.history.isNotEmpty;
|
||||||
KenLogger.success("has history: $hasHistory");
|
KenLogger.success("has history: $hasHistory");
|
||||||
KenLogger.success(
|
KenLogger.success(
|
||||||
@@ -200,8 +222,10 @@ class _MihAiChatState extends State<MihAiChat> {
|
|||||||
children: [
|
children: [
|
||||||
LlmChatView(
|
LlmChatView(
|
||||||
provider: mzansiAiProvider.ollamaProvider,
|
provider: mzansiAiProvider.ollamaProvider,
|
||||||
|
messageSender: mzansiAiProvider.ollamaProvider.sendMessageStream,
|
||||||
// welcomeMessage:
|
// welcomeMessage:
|
||||||
// "Mzansi AI is here to help. Send us a messahe and we'll try our best to assist you.",
|
// "Mzansi AI is here to help. Send us a messahe and we'll try our best to assist you.",
|
||||||
|
autofocus: false,
|
||||||
enableAttachments: false,
|
enableAttachments: false,
|
||||||
enableVoiceNotes: true,
|
enableVoiceNotes: true,
|
||||||
style: mzansiAiProvider.getChatStyle(context),
|
style: mzansiAiProvider.getChatStyle(context),
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import record_macos
|
|||||||
import screen_brightness_macos
|
import screen_brightness_macos
|
||||||
import share_plus
|
import share_plus
|
||||||
import shared_preferences_foundation
|
import shared_preferences_foundation
|
||||||
|
import speech_to_text
|
||||||
import sqflite_darwin
|
import sqflite_darwin
|
||||||
import syncfusion_pdfviewer_macos
|
import syncfusion_pdfviewer_macos
|
||||||
import url_launcher_macos
|
import url_launcher_macos
|
||||||
@@ -49,6 +50,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
|||||||
ScreenBrightnessMacosPlugin.register(with: registry.registrar(forPlugin: "ScreenBrightnessMacosPlugin"))
|
ScreenBrightnessMacosPlugin.register(with: registry.registrar(forPlugin: "ScreenBrightnessMacosPlugin"))
|
||||||
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
|
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
|
||||||
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
||||||
|
SpeechToTextPlugin.register(with: registry.registrar(forPlugin: "SpeechToTextPlugin"))
|
||||||
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
|
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
|
||||||
SyncfusionFlutterPdfViewerPlugin.register(with: registry.registrar(forPlugin: "SyncfusionFlutterPdfViewerPlugin"))
|
SyncfusionFlutterPdfViewerPlugin.register(with: registry.registrar(forPlugin: "SyncfusionFlutterPdfViewerPlugin"))
|
||||||
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
||||||
|
|||||||
@@ -703,21 +703,13 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "6.0.0"
|
version: "6.0.0"
|
||||||
flutter_markdown_plus:
|
flutter_markdown_plus:
|
||||||
dependency: transitive
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: flutter_markdown_plus
|
name: flutter_markdown_plus
|
||||||
sha256: "7f349c075157816da399216a4127096108fd08e1ac931e34e72899281db4113c"
|
sha256: "7f349c075157816da399216a4127096108fd08e1ac931e34e72899281db4113c"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.5"
|
version: "1.0.5"
|
||||||
flutter_math_fork:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: flutter_math_fork
|
|
||||||
sha256: "6d5f2f1aa57ae539ffb0a04bb39d2da67af74601d685a161aff7ce5bda5fa407"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.7.4"
|
|
||||||
flutter_native_splash:
|
flutter_native_splash:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -904,14 +896,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.0.0"
|
version: "6.0.0"
|
||||||
gpt_markdown:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: gpt_markdown
|
|
||||||
sha256: "68d5337c8a00fc03a37dbddf84a6fd90401c30e99b6baf497ef9522a81fc34ee"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "1.1.2"
|
|
||||||
graphs:
|
graphs:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -1360,6 +1344,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.4"
|
version: "1.0.4"
|
||||||
|
pedantic:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: pedantic
|
||||||
|
sha256: "67fc27ed9639506c856c840ccce7594d0bdcd91bc8d53d6e52359449a1d50602"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.11.1"
|
||||||
petitparser:
|
petitparser:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -1741,6 +1733,30 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.10.1"
|
version: "1.10.1"
|
||||||
|
speech_to_text:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: speech_to_text
|
||||||
|
sha256: c07557664974afa061f221d0d4186935bea4220728ea9446702825e8b988db04
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "7.3.0"
|
||||||
|
speech_to_text_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: speech_to_text_platform_interface
|
||||||
|
sha256: a1935847704e41ee468aad83181ddd2423d0833abe55d769c59afca07adb5114
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.3.0"
|
||||||
|
speech_to_text_windows:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: speech_to_text_windows
|
||||||
|
sha256: "2c9846d18253c7bbe059a276297ef9f27e8a2745dead32192525beb208195072"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.0+beta.8"
|
||||||
sprintf:
|
sprintf:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -1933,14 +1949,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.2"
|
version: "1.0.2"
|
||||||
tuple:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: tuple
|
|
||||||
sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.0.2"
|
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -54,12 +54,13 @@ dependencies:
|
|||||||
go_router: ^16.1.0
|
go_router: ^16.1.0
|
||||||
screen_brightness: ^2.1.6
|
screen_brightness: ^2.1.6
|
||||||
cached_network_image: ^3.4.1
|
cached_network_image: ^3.4.1
|
||||||
gpt_markdown: ^1.1.2
|
|
||||||
upgrader: ^12.0.0
|
upgrader: ^12.0.0
|
||||||
screenshot: ^3.0.0
|
screenshot: ^3.0.0
|
||||||
file_saver: ^0.3.1
|
file_saver: ^0.3.1
|
||||||
provider: ^6.1.5+1
|
provider: ^6.1.5+1
|
||||||
flutter_ai_toolkit: ^0.10.0
|
flutter_ai_toolkit: ^0.10.0
|
||||||
|
flutter_markdown_plus: ^1.0.5
|
||||||
|
speech_to_text: ^7.3.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
#include <record_windows/record_windows_plugin_c_api.h>
|
#include <record_windows/record_windows_plugin_c_api.h>
|
||||||
#include <screen_brightness_windows/screen_brightness_windows_plugin.h>
|
#include <screen_brightness_windows/screen_brightness_windows_plugin.h>
|
||||||
#include <share_plus/share_plus_windows_plugin_c_api.h>
|
#include <share_plus/share_plus_windows_plugin_c_api.h>
|
||||||
|
#include <speech_to_text_windows/speech_to_text_windows.h>
|
||||||
#include <syncfusion_pdfviewer_windows/syncfusion_pdfviewer_windows_plugin.h>
|
#include <syncfusion_pdfviewer_windows/syncfusion_pdfviewer_windows_plugin.h>
|
||||||
#include <url_launcher_windows/url_launcher_windows.h>
|
#include <url_launcher_windows/url_launcher_windows.h>
|
||||||
|
|
||||||
@@ -46,6 +47,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
|
|||||||
registry->GetRegistrarForPlugin("ScreenBrightnessWindowsPlugin"));
|
registry->GetRegistrarForPlugin("ScreenBrightnessWindowsPlugin"));
|
||||||
SharePlusWindowsPluginCApiRegisterWithRegistrar(
|
SharePlusWindowsPluginCApiRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi"));
|
registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi"));
|
||||||
|
SpeechToTextWindowsRegisterWithRegistrar(
|
||||||
|
registry->GetRegistrarForPlugin("SpeechToTextWindows"));
|
||||||
SyncfusionPdfviewerWindowsPluginRegisterWithRegistrar(
|
SyncfusionPdfviewerWindowsPluginRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("SyncfusionPdfviewerWindowsPlugin"));
|
registry->GetRegistrarForPlugin("SyncfusionPdfviewerWindowsPlugin"));
|
||||||
UrlLauncherWindowsRegisterWithRegistrar(
|
UrlLauncherWindowsRegisterWithRegistrar(
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
|||||||
record_windows
|
record_windows
|
||||||
screen_brightness_windows
|
screen_brightness_windows
|
||||||
share_plus
|
share_plus
|
||||||
|
speech_to_text_windows
|
||||||
syncfusion_pdfviewer_windows
|
syncfusion_pdfviewer_windows
|
||||||
url_launcher_windows
|
url_launcher_windows
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user