♻️ Refactored and joined the Solar Network

This commit is contained in:
LittleSheep 2024-03-17 20:22:46 +08:00
parent f3da8f5349
commit 5da657a73c
39 changed files with 386 additions and 345 deletions

@ -1,16 +1,3 @@
# goatagent # SolarAgent
The official Application of Goatworks Global Hydrogen Network The official Solar Network moblie application.
## Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.

@ -23,7 +23,7 @@ if (flutterVersionName == null) {
} }
android { android {
namespace "studio.smartsheep.goatagent" namespace "dev.solsynth.solaragent"
compileSdkVersion flutter.compileSdkVersion compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion ndkVersion flutter.ndkVersion
@ -41,7 +41,7 @@ android {
} }
defaultConfig { defaultConfig {
applicationId "studio.smartsheep.goatagent" applicationId "dev.solsynth.solaragent"
// You can update the following values to match your application needs. // 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. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion flutter.minSdkVersion minSdkVersion flutter.minSdkVersion
@ -50,7 +50,7 @@ android {
versionName flutterVersionName versionName flutterVersionName
manifestPlaceholders = [ manifestPlaceholders = [
applicationName : 'android.app.Application', applicationName : 'android.app.Application',
appAuthRedirectScheme: 'goatagent' appAuthRedirectScheme: 'solaragent'
] ]
} }

@ -9,7 +9,7 @@
"client_info": { "client_info": {
"mobilesdk_app_id": "1:659822066072:android:39e699282c97a7cfc013ed", "mobilesdk_app_id": "1:659822066072:android:39e699282c97a7cfc013ed",
"android_client_info": { "android_client_info": {
"package_name": "studio.smartsheep.goatagent" "package_name": "dev.solsynth.solaragent"
} }
}, },
"oauth_client": [ "oauth_client": [

@ -1,6 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> <manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application <application
android:label="GoatAgent" android:label="SolarAgent"
android:name="${applicationName}" android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"> android:icon="@mipmap/ic_launcher">
<activity <activity

@ -1,4 +1,4 @@
package studio.smartsheep.goatagent package dev.solsynth.solaragent
import io.flutter.embedding.android.FlutterActivity import io.flutter.embedding.android.FlutterActivity

@ -9,7 +9,7 @@
"client_info": { "client_info": {
"mobilesdk_app_id": "1:659822066072:android:39e699282c97a7cfc013ed", "mobilesdk_app_id": "1:659822066072:android:39e699282c97a7cfc013ed",
"android_client_info": { "android_client_info": {
"package_name": "studio.smartsheep.goatagent" "package_name": "dev.solsynth.solaragent"
} }
}, },
"oauth_client": [ "oauth_client": [

@ -9,7 +9,7 @@
<key>PLIST_VERSION</key> <key>PLIST_VERSION</key>
<string>1</string> <string>1</string>
<key>BUNDLE_ID</key> <key>BUNDLE_ID</key>
<string>studio.smartsheep.goatagent</string> <string>dev.solsynth.solaragent</string>
<key>PROJECT_ID</key> <key>PROJECT_ID</key>
<string>smartsheep-hydrogen</string> <string>smartsheep-hydrogen</string>
<key>STORAGE_BUCKET</key> <key>STORAGE_BUCKET</key>

@ -221,7 +221,7 @@
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
BuildIndependentTargetsInParallel = YES; BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 1430; LastUpgradeCheck = 1510;
ORGANIZATIONNAME = ""; ORGANIZATIONNAME = "";
TargetAttributes = { TargetAttributes = {
331C8080294A63A400263BE5 = { 331C8080294A63A400263BE5 = {
@ -505,14 +505,14 @@
DEVELOPMENT_TEAM = W7HPZ53V6B; DEVELOPMENT_TEAM = W7HPZ53V6B;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = GoatAgent; INFOPLIST_KEY_CFBundleDisplayName = SolarAgent;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.0; MARKETING_VERSION = 1.0.0;
PRODUCT_BUNDLE_IDENTIFIER = studio.smartsheep.goatagent; PRODUCT_BUNDLE_IDENTIFIER = dev.solsynth.solaragent;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;
@ -529,7 +529,7 @@
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0; MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = studio.smartsheep.goatagent.RunnerTests; PRODUCT_BUNDLE_IDENTIFIER = dev.solsynth.solaragent.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@ -547,7 +547,7 @@
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0; MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = studio.smartsheep.goatagent.RunnerTests; PRODUCT_BUNDLE_IDENTIFIER = dev.solsynth.solaragent.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
@ -563,7 +563,7 @@
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0; MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = studio.smartsheep.goatagent.RunnerTests; PRODUCT_BUNDLE_IDENTIFIER = dev.solsynth.solaragent.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
@ -694,14 +694,14 @@
DEVELOPMENT_TEAM = W7HPZ53V6B; DEVELOPMENT_TEAM = W7HPZ53V6B;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = GoatAgent; INFOPLIST_KEY_CFBundleDisplayName = SolarAgent;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.0; MARKETING_VERSION = 1.0.0;
PRODUCT_BUNDLE_IDENTIFIER = studio.smartsheep.goatagent; PRODUCT_BUNDLE_IDENTIFIER = dev.solsynth.solaragent;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@ -721,14 +721,14 @@
DEVELOPMENT_TEAM = W7HPZ53V6B; DEVELOPMENT_TEAM = W7HPZ53V6B;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = GoatAgent; INFOPLIST_KEY_CFBundleDisplayName = SolarAgent;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.0; MARKETING_VERSION = 1.0.0;
PRODUCT_BUNDLE_IDENTIFIER = studio.smartsheep.goatagent; PRODUCT_BUNDLE_IDENTIFIER = dev.solsynth.solaragent;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "1430" LastUpgradeVersion = "1510"
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"

@ -9,7 +9,7 @@
<key>PLIST_VERSION</key> <key>PLIST_VERSION</key>
<string>1</string> <string>1</string>
<key>BUNDLE_ID</key> <key>BUNDLE_ID</key>
<string>studio.smartsheep.goatagent</string> <string>dev.solsynth.solaragent</string>
<key>PROJECT_ID</key> <key>PROJECT_ID</key>
<string>smartsheep-hydrogen</string> <string>smartsheep-hydrogen</string>
<key>STORAGE_BUCKET</key> <key>STORAGE_BUCKET</key>

@ -7,7 +7,7 @@
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string> <string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
<string>GoatAgent</string> <string>SolarAgent</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string> <string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
@ -15,7 +15,7 @@
<key>CFBundleInfoDictionaryVersion</key> <key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string> <string>6.0</string>
<key>CFBundleName</key> <key>CFBundleName</key>
<string>GoatAgent</string> <string>SolarAgent</string>
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>

@ -3,34 +3,33 @@ import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:goatagent/firebase.dart'; import 'package:solaragent/firebase.dart';
import 'package:goatagent/screens/auth.dart'; import 'package:solaragent/preferences.dart';
import 'package:solaragent/screens/auth.dart';
import 'package:oauth2/oauth2.dart' as oauth2; import 'package:oauth2/oauth2.dart' as oauth2;
final authClient = AuthGuard();
class AuthGuard { class AuthGuard {
static final AuthGuard _singleton = AuthGuard._internal(); AuthGuard();
final deviceEndpoint = final deviceEndpoint =
Uri.parse('https://id.smartsheep.studio/api/notifications/subscribe'); Uri.parse('https://id.solsynth.dev/api/notifications/subscribe');
final authorizationEndpoint = final authorizationEndpoint =
Uri.parse('https://id.smartsheep.studio/auth/o/connect'); Uri.parse('https://id.solsynth.dev/auth/o/connect');
final tokenEndpoint = final tokenEndpoint =
Uri.parse('https://id.smartsheep.studio/api/auth/token'); Uri.parse('https://id.solsynth.dev/api/auth/token');
final userinfoEndpoint = final userinfoEndpoint =
Uri.parse('https://id.smartsheep.studio/api/users/me'); Uri.parse('https://id.solsynth.dev/api/users/me');
final redirectUrl = Uri.parse('goatagent://auth'); final redirectUrl = Uri.parse('solaragent://auth');
static const clientId = "goatagent"; static const clientId = "solaragent";
static const clientSecret = "_F4%q2Eea3"; static const clientSecret = "_F4%q2Eea3";
static const storage = FlutterSecureStorage(); static const storage = FlutterSecureStorage();
static const storageKey = "identity"; static const storageKey = "identity";
static const profileKey = "profiles"; static const profileKey = "profiles";
factory AuthGuard() {
return _singleton;
}
oauth2.Client? client; oauth2.Client? client;
Future<bool> pickClient() async { Future<bool> pickClient() async {
@ -68,11 +67,6 @@ class AuthGuard {
var authorizationUrl = grant.getAuthorizationUrl(redirectUrl); var authorizationUrl = grant.getAuthorizationUrl(redirectUrl);
if (Platform.isAndroid || Platform.isIOS) { if (Platform.isAndroid || Platform.isIOS) {
// Let Goatpass know it is embed in an app
authorizationUrl = authorizationUrl.replace(
queryParameters: {"embedded": "yes"}
..addAll(authorizationUrl.queryParameters));
// Use WebView to get authorization url // Use WebView to get authorization url
var responseUrl = await Navigator.of(context, rootNavigator: true).push( var responseUrl = await Navigator.of(context, rootNavigator: true).push(
MaterialPageRoute( MaterialPageRoute(

@ -67,7 +67,7 @@ class DefaultFirebaseOptions {
messagingSenderId: '659822066072', messagingSenderId: '659822066072',
projectId: 'smartsheep-hydrogen', projectId: 'smartsheep-hydrogen',
storageBucket: 'smartsheep-hydrogen.appspot.com', storageBucket: 'smartsheep-hydrogen.appspot.com',
iosBundleId: 'studio.smartsheep.goatagent', iosBundleId: 'dev.solsynth.solaragent',
); );
static const FirebaseOptions macos = FirebaseOptions( static const FirebaseOptions macos = FirebaseOptions(
@ -76,6 +76,6 @@ class DefaultFirebaseOptions {
messagingSenderId: '659822066072', messagingSenderId: '659822066072',
projectId: 'smartsheep-hydrogen', projectId: 'smartsheep-hydrogen',
storageBucket: 'smartsheep-hydrogen.appspot.com', storageBucket: 'smartsheep-hydrogen.appspot.com',
iosBundleId: 'studio.smartsheep.goatagent.RunnerTests', iosBundleId: 'dev.solsynth.solaragent.RunnerTests',
); );
} }

@ -1,114 +0,0 @@
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/material.dart';
import 'package:goatagent/screens/account.dart';
import 'package:goatagent/screens/dashboard.dart';
import 'package:goatagent/screens/notifications.dart';
class AgentNavigation extends StatefulWidget {
AgentNavigation({super.key});
static const items = [
{'label': 'Dashboard', 'icon': Icon(Icons.home)},
{'label': 'Notifications', 'icon': Icon(Icons.notifications)},
{'label': 'Account', 'icon': Icon(Icons.account_circle)},
];
final bottomDestinations = items
.map((element) => BottomNavigationBarItem(
icon: element["icon"] as Widget,
label: element["label"] as String,
))
.toList();
final railDestinations = items
.map((element) => NavigationRailDestination(
icon: element["icon"] as Widget,
label: Text(element["label"] as String),
))
.toList();
@override
State<AgentNavigation> createState() => _AgentNavigationState();
}
class _AgentNavigationState extends State<AgentNavigation> {
int _view = 0;
Future<void> initMessage(BuildContext context) async {
void navigate() {
setState(() {
_view = 1;
});
}
RemoteMessage? initialMessage =
await FirebaseMessaging.instance.getInitialMessage();
if (initialMessage != null) {
navigate();
}
FirebaseMessaging.onMessageOpenedApp.listen((event) {
navigate();
});
}
@override
void initState() {
super.initState();
initMessage(context);
}
@override
Widget build(BuildContext context) {
final isLargeScreen = MediaQuery.of(context).size.width > 640;
final content = Stack(
children: [
Offstage(
offstage: _view != 0,
child: const DashboardScreen(),
),
Offstage(
offstage: _view != 1,
child: const NotificationScreen(),
),
Offstage(
offstage: _view != 2,
child: const AccountScreen(),
)
],
);
if (isLargeScreen) {
return Row(children: <Widget>[
NavigationRail(
selectedIndex: _view,
groupAlignment: 0,
onDestinationSelected: (int index) {
setState(() {
_view = index;
});
},
labelType: NavigationRailLabelType.all,
destinations: widget.railDestinations,
),
const VerticalDivider(thickness: 1, width: 1),
Expanded(child: content),
]);
} else {
return Scaffold(
body: content,
bottomNavigationBar: BottomNavigationBar(
currentIndex: _view,
showUnselectedLabels: false,
items: widget.bottomDestinations,
onTap: (index) {
setState(() {
_view = index;
});
},
),
);
}
}
}

@ -1,8 +1,8 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:goatagent/auth.dart'; import 'package:solaragent/auth.dart';
import 'package:goatagent/firebase.dart'; import 'package:solaragent/firebase.dart';
import 'package:solaragent/router.dart';
import 'layouts/navigation.dart'; import 'package:solaragent/widgets/navigation.dart';
void main() async { void main() async {
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
@ -13,39 +13,51 @@ void main() async {
print(e); print(e);
} }
await AuthGuard().pickClient(); await authClient.pickClient();
runApp(const GoatAgent()); runApp(const SolarAgent());
} }
class GoatAgent extends StatelessWidget { class SolarAgent extends StatelessWidget {
const GoatAgent({super.key}); const SolarAgent({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MaterialApp( return MaterialApp.router(
title: 'GoatAgent', title: 'SolarAgent',
theme: ThemeData( theme: ThemeData(
brightness: Brightness.light, brightness: Brightness.light,
colorScheme: ColorScheme.fromSwatch( colorScheme: ColorScheme.fromSwatch(
primarySwatch: Colors.indigo, primarySwatch: Colors.indigo,
accentColor: Colors.indigoAccent, accentColor: Colors.indigoAccent,
backgroundColor: Colors.white, backgroundColor: Colors.white,
brightness: Brightness.light, brightness: Brightness.light,
), ),
useMaterial3: true, useMaterial3: true,
), ),
darkTheme: ThemeData( darkTheme: ThemeData(
brightness: Brightness.dark, brightness: Brightness.dark,
colorScheme: ColorScheme.fromSwatch( colorScheme: ColorScheme.fromSwatch(
primarySwatch: Colors.indigo, primarySwatch: Colors.indigo,
accentColor: Colors.indigoAccent, accentColor: Colors.indigoAccent,
backgroundColor: Colors.black, backgroundColor: Colors.black,
brightness: Brightness.dark, brightness: Brightness.dark,
), ),
useMaterial3: true, useMaterial3: true,
), ),
home: AgentNavigation(), routerConfig: router,
builder: (context, child) => Overlay(
initialEntries: [
OverlayEntry(
builder: (context) => SafeArea(
child: Scaffold(
body: child,
bottomNavigationBar: const AgentNavigation(),
),
),
)
],
),
); );
} }
} }

5
lib/preferences.dart Normal file

@ -0,0 +1,5 @@
import 'package:shared_preferences/shared_preferences.dart';
getPreferences() async {
return await SharedPreferences.getInstance();
}

21
lib/router.dart Normal file

@ -0,0 +1,21 @@
import 'package:go_router/go_router.dart';
import 'package:solaragent/screens/account.dart';
import 'package:solaragent/screens/dashboard.dart';
import 'package:solaragent/screens/notifications.dart';
final router = GoRouter(
routes: [
GoRoute(
path: '/',
builder: (context, state) => const DashboardScreen(),
),
GoRoute(
path: '/notifications',
builder: (context, state) => const NotificationScreen(),
),
GoRoute(
path: '/account',
builder: (context, state) => const AccountScreen(),
)
],
);

@ -16,9 +16,9 @@ class AboutScreen extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Text('GoatAgent', Text('SolarAgent',
style: Theme.of(context).textTheme.headlineMedium), style: Theme.of(context).textTheme.headlineMedium),
Text('Goatworks Official Mobile Helper', Text('Solarworks Official Mobile Helper',
style: Theme.of(context).textTheme.bodyLarge), style: Theme.of(context).textTheme.bodyLarge),
const SizedBox(height: 20), const SizedBox(height: 20),
FutureBuilder( FutureBuilder(
@ -37,7 +37,7 @@ class AboutScreen extends StatelessWidget {
const SizedBox(height: 10), const SizedBox(height: 10),
MaterialButton( MaterialButton(
onPressed: () async { onPressed: () async {
await launchUrl(Uri.parse('https://smartsheep.studio')); await launchUrl(Uri.parse('https://solsynth.dev'));
}, },
child: const Text('Official Website'), child: const Text('Official Website'),
), ),

@ -1,8 +1,8 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
import 'package:goatagent/auth.dart'; import 'package:solaragent/auth.dart';
import 'package:goatagent/screens/about.dart'; import 'package:solaragent/screens/about.dart';
import 'package:goatagent/widgets/name_card.dart'; import 'package:solaragent/widgets/name_card.dart';
class AccountScreen extends StatefulWidget { class AccountScreen extends StatefulWidget {
const AccountScreen({super.key}); const AccountScreen({super.key});
@ -17,7 +17,7 @@ class _AccountScreenState extends State<AccountScreen> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
AuthGuard().isAuthorized().then((value) { authClient.isAuthorized().then((value) {
setState(() { setState(() {
isAuthorized = value; isAuthorized = value;
}); });
@ -35,8 +35,8 @@ class _AccountScreenState extends State<AccountScreen> {
padding: const EdgeInsets.only(top: 20), padding: const EdgeInsets.only(top: 20),
child: NameCard( child: NameCard(
onLogin: () async { onLogin: () async {
await AuthGuard().login(context); await authClient.login(context);
var authorized = await AuthGuard().isAuthorized(); var authorized = await authClient.isAuthorized();
setState(() { setState(() {
isAuthorized = authorized; isAuthorized = authorized;
}); });
@ -49,44 +49,43 @@ class _AccountScreenState extends State<AccountScreen> {
spacing: 5, spacing: 5,
children: [ children: [
FutureBuilder( FutureBuilder(
future: AuthGuard().isAuthorized(), future: authClient.isAuthorized(),
builder: (BuildContext context, AsyncSnapshot<bool> snapshot) { builder:
if (snapshot.hasData && snapshot.data == true) { (BuildContext context, AsyncSnapshot<bool> snapshot) {
return Card( return (snapshot.hasData && snapshot.data == true)
elevation: 0, ? InkWell(
child: InkWell( borderRadius:
splashColor: Colors.indigo.withAlpha(30), const BorderRadius.all(Radius.circular(40)),
onTap: () async { splashColor: Colors.indigo.withAlpha(30),
AuthGuard().logout(); onTap: () async {
var authorized = await AuthGuard().isAuthorized(); authClient.logout();
setState(() { var authorized =
isAuthorized = authorized; await authClient.isAuthorized();
}); setState(() {
}, isAuthorized = authorized;
child: const ListTile( });
leading: Icon(Icons.logout), },
title: Text('Logout'), child: const ListTile(
), leading: Icon(Icons.logout),
), title: Text('Logout'),
); ),
} else { )
return Container(); : Container();
}
}, },
), ),
Card( InkWell(
elevation: 0, borderRadius: const BorderRadius.all(Radius.circular(40)),
child: InkWell( splashColor: Colors.indigo.withAlpha(30),
splashColor: Colors.indigo.withAlpha(30), onTap: () {
onTap: () { Navigator.push(
Navigator.push(context, MaterialPageRoute( context,
builder: (context) => const AboutScreen(), MaterialPageRoute(
)); builder: (context) => const AboutScreen(),
}, ));
child: const ListTile( },
leading: Icon(Icons.info_outline), child: const ListTile(
title: Text('About'), leading: Icon(Icons.info_outline),
), title: Text('About'),
), ),
), ),
], ],

@ -11,7 +11,7 @@ class AuthorizationScreen extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: const Text('Connect with Goatpass'), title: const Text('Sign in'),
), ),
body: Stack(children: [ body: Stack(children: [
WebViewWidget( WebViewWidget(
@ -20,10 +20,10 @@ class AuthorizationScreen extends StatelessWidget {
..setBackgroundColor(Colors.white) ..setBackgroundColor(Colors.white)
..setNavigationDelegate(NavigationDelegate( ..setNavigationDelegate(NavigationDelegate(
onNavigationRequest: (NavigationRequest request) { onNavigationRequest: (NavigationRequest request) {
if (request.url.startsWith('goatagent://auth')) { if (request.url.startsWith('solaragent://auth')) {
Navigator.of(context).pop(request.url); Navigator.of(context).pop(request.url);
return NavigationDecision.prevent; return NavigationDecision.prevent;
} else if (request.url.startsWith("https://id.smartsheep.studio/auth/register")) { } else if (request.url.startsWith("https://solsynth.dev/auth/sign-up")) {
launchUrl(Uri.parse(request.url)); launchUrl(Uri.parse(request.url));
return NavigationDecision.prevent; return NavigationDecision.prevent;
} }

@ -1,7 +1,7 @@
import 'dart:convert'; import 'dart:convert';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:goatagent/screens/application.dart'; import 'package:solaragent/screens/application.dart';
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;
class DashboardScreen extends StatefulWidget { class DashboardScreen extends StatefulWidget {
@ -14,7 +14,7 @@ class DashboardScreen extends StatefulWidget {
class _DashboardScreenState extends State<DashboardScreen> { class _DashboardScreenState extends State<DashboardScreen> {
final client = http.Client(); final client = http.Client();
final directoryEndpoint = final directoryEndpoint =
Uri.parse('https://id.smartsheep.studio/.well-known'); Uri.parse('https://id.solsynth.dev/.well-known');
List<dynamic> directory = List.empty(); List<dynamic> directory = List.empty();

@ -1,7 +1,7 @@
import 'dart:convert'; import 'dart:convert';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:goatagent/auth.dart'; import 'package:solaragent/auth.dart';
class NotificationScreen extends StatefulWidget { class NotificationScreen extends StatefulWidget {
const NotificationScreen({super.key}); const NotificationScreen({super.key});
@ -12,7 +12,7 @@ class NotificationScreen extends StatefulWidget {
class _NotificationScreenState extends State<NotificationScreen> { class _NotificationScreenState extends State<NotificationScreen> {
final notificationEndpoint = Uri.parse( final notificationEndpoint = Uri.parse(
'https://id.smartsheep.studio/api/notifications?skip=0&take=20'); 'https://id.solsynth.dev/api/notifications?skip=0&take=25');
List<dynamic> notifications = List.empty(); List<dynamic> notifications = List.empty();
@ -23,9 +23,9 @@ class _NotificationScreenState extends State<NotificationScreen> {
} }
Future<void> _pullNotifications() async { Future<void> _pullNotifications() async {
if (await AuthGuard().isAuthorized()) { if (await authClient.isAuthorized()) {
await AuthGuard().pullProfiles(); await authClient.pullProfiles();
var profiles = await AuthGuard().readProfiles(); var profiles = await authClient.readProfiles();
setState(() { setState(() {
notifications = profiles['notifications']; notifications = profiles['notifications'];
}); });
@ -33,11 +33,11 @@ class _NotificationScreenState extends State<NotificationScreen> {
} }
Future<void> _markAsRead(element) async { Future<void> _markAsRead(element) async {
if (AuthGuard().client != null) { if (authClient.client != null) {
var id = element['id']; var id = element['id'];
var uri = var uri =
Uri.parse('https://id.smartsheep.studio/api/notifications/$id/read'); Uri.parse('https://id.solsynth.dev/api/notifications/$id/read');
await AuthGuard().client!.put(uri); await authClient.client!.put(uri);
} }
} }

@ -12,8 +12,8 @@ class NameCard extends StatelessWidget {
final void Function()? onCheck; final void Function()? onCheck;
Future<CircleAvatar> _getAvatar() async { Future<CircleAvatar> _getAvatar() async {
if (await AuthGuard().isAuthorized()) { if (await authClient.isAuthorized()) {
final profiles = await AuthGuard().readProfiles(); final profiles = await authClient.readProfiles();
return CircleAvatar(backgroundImage: NetworkImage(profiles["picture"])); return CircleAvatar(backgroundImage: NetworkImage(profiles["picture"]));
} else { } else {
return const CircleAvatar(child: Icon(Icons.account_circle)); return const CircleAvatar(child: Icon(Icons.account_circle));
@ -21,8 +21,8 @@ class NameCard extends StatelessWidget {
} }
Future<Column> _getDescribe() async { Future<Column> _getDescribe() async {
if (await AuthGuard().isAuthorized()) { if (await authClient.isAuthorized()) {
final profiles = await AuthGuard().readProfiles(); final profiles = await authClient.readProfiles();
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -59,7 +59,7 @@ class NameCard extends StatelessWidget {
child: InkWell( child: InkWell(
splashColor: Colors.indigo.withAlpha(30), splashColor: Colors.indigo.withAlpha(30),
onTap: () async { onTap: () async {
if (await AuthGuard().isAuthorized() && onCheck != null) { if (await authClient.isAuthorized() && onCheck != null) {
onCheck!(); onCheck!();
} else if (onLogin != null) { } else if (onLogin != null) {
onLogin!(); onLogin!();

@ -0,0 +1,38 @@
import 'package:flutter/material.dart';
import 'package:solaragent/router.dart';
class AgentNavigation extends StatefulWidget {
const AgentNavigation({super.key});
static const List<(String, NavigationDestination)> destinations = [
('/', NavigationDestination(icon: Icon(Icons.home), label: 'Home')),
('/notifications', NavigationDestination(icon: Icon(Icons.notifications), label: 'Notifications')),
('/account', NavigationDestination(icon: Icon(Icons.account_circle), label: 'Account')),
];
@override
State<AgentNavigation> createState() => _AgentNavigationState();
}
class _AgentNavigationState extends State<AgentNavigation> {
int currentPage = 0;
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return NavigationBar(
selectedIndex: currentPage,
destinations: AgentNavigation.destinations
.map(((String, NavigationDestination) e) => e.$2)
.toList(),
onDestinationSelected: (index) {
router.go(AgentNavigation.destinations[index].$1);
setState(() => currentPage = index);
},
);
}
}

@ -4,10 +4,10 @@ project(runner LANGUAGES CXX)
# The name of the executable created for the application. Change this to change # The name of the executable created for the application. Change this to change
# the on-disk name of your application. # the on-disk name of your application.
set(BINARY_NAME "goatagent") set(BINARY_NAME "solaragent")
# The unique GTK application identifier for this application. See: # The unique GTK application identifier for this application. See:
# https://wiki.gnome.org/HowDoI/ChooseApplicationID # https://wiki.gnome.org/HowDoI/ChooseApplicationID
set(APPLICATION_ID "studio.smartsheep.goatagent") set(APPLICATION_ID "dev.solsynth.solaragent")
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent # Explicitly opt in to modern CMake behaviors to avoid warnings with recent
# versions of CMake. # versions of CMake.

@ -40,11 +40,11 @@ static void my_application_activate(GApplication* application) {
if (use_header_bar) { if (use_header_bar) {
GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
gtk_widget_show(GTK_WIDGET(header_bar)); gtk_widget_show(GTK_WIDGET(header_bar));
gtk_header_bar_set_title(header_bar, "goatagent"); gtk_header_bar_set_title(header_bar, "solaragent");
gtk_header_bar_set_show_close_button(header_bar, TRUE); gtk_header_bar_set_show_close_button(header_bar, TRUE);
gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
} else { } else {
gtk_window_set_title(window, "goatagent"); gtk_window_set_title(window, "solaragent");
} }
gtk_window_set_default_size(window, 1280, 720); gtk_window_set_default_size(window, 1280, 720);

@ -12,6 +12,7 @@ import flutter_appauth
import flutter_secure_storage_macos import flutter_secure_storage_macos
import package_info_plus import package_info_plus
import path_provider_foundation import path_provider_foundation
import shared_preferences_foundation
import url_launcher_macos import url_launcher_macos
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
@ -22,5 +23,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin")) FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
} }

@ -65,7 +65,7 @@
331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; }; 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; }; 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; }; 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
33CC10ED2044A3C60003C045 /* goatagent.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = goatagent.app; sourceTree = BUILT_PRODUCTS_DIR; }; 33CC10ED2044A3C60003C045 /* solaragent.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = solaragent.app; sourceTree = BUILT_PRODUCTS_DIR; };
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; }; 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; }; 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
@ -134,7 +134,7 @@
33CC10EE2044A3C60003C045 /* Products */ = { 33CC10EE2044A3C60003C045 /* Products */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
33CC10ED2044A3C60003C045 /* goatagent.app */, 33CC10ED2044A3C60003C045 /* solaragent.app */,
331C80D5294CF71000263BE5 /* RunnerTests.xctest */, 331C80D5294CF71000263BE5 /* RunnerTests.xctest */,
); );
name = Products; name = Products;
@ -220,7 +220,7 @@
); );
name = Runner; name = Runner;
productName = Runner; productName = Runner;
productReference = 33CC10ED2044A3C60003C045 /* goatagent.app */; productReference = 33CC10ED2044A3C60003C045 /* solaragent.app */;
productType = "com.apple.product-type.application"; productType = "com.apple.product-type.application";
}; };
/* End PBXNativeTarget section */ /* End PBXNativeTarget section */
@ -388,10 +388,10 @@
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0; MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = studio.smartsheep.goatagent.RunnerTests; PRODUCT_BUNDLE_IDENTIFIER = dev.solsynth.solaragent.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/goatagent.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/goatagent"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/solaragent.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/solaragent";
}; };
name = Debug; name = Debug;
}; };
@ -402,10 +402,10 @@
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0; MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = studio.smartsheep.goatagent.RunnerTests; PRODUCT_BUNDLE_IDENTIFIER = dev.solsynth.solaragent.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/goatagent.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/goatagent"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/solaragent.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/solaragent";
}; };
name = Release; name = Release;
}; };
@ -416,10 +416,10 @@
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0; MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = studio.smartsheep.goatagent.RunnerTests; PRODUCT_BUNDLE_IDENTIFIER = dev.solsynth.solaragent.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0; SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/goatagent.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/goatagent"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/solaragent.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/solaragent";
}; };
name = Profile; name = Profile;
}; };

@ -15,7 +15,7 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "33CC10EC2044A3C60003C045" BlueprintIdentifier = "33CC10EC2044A3C60003C045"
BuildableName = "goatagent.app" BuildableName = "solaragent.app"
BlueprintName = "Runner" BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj"> ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference> </BuildableReference>
@ -31,7 +31,7 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "33CC10EC2044A3C60003C045" BlueprintIdentifier = "33CC10EC2044A3C60003C045"
BuildableName = "goatagent.app" BuildableName = "solaragent.app"
BlueprintName = "Runner" BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj"> ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference> </BuildableReference>
@ -65,7 +65,7 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "33CC10EC2044A3C60003C045" BlueprintIdentifier = "33CC10EC2044A3C60003C045"
BuildableName = "goatagent.app" BuildableName = "solaragent.app"
BlueprintName = "Runner" BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj"> ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference> </BuildableReference>
@ -82,7 +82,7 @@
<BuildableReference <BuildableReference
BuildableIdentifier = "primary" BuildableIdentifier = "primary"
BlueprintIdentifier = "33CC10EC2044A3C60003C045" BlueprintIdentifier = "33CC10EC2044A3C60003C045"
BuildableName = "goatagent.app" BuildableName = "solaragent.app"
BlueprintName = "Runner" BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj"> ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference> </BuildableReference>

@ -5,10 +5,10 @@
// 'flutter create' template. // 'flutter create' template.
// The application's name. By default this is also the title of the Flutter window. // The application's name. By default this is also the title of the Flutter window.
PRODUCT_NAME = goatagent PRODUCT_NAME = solaragent
// The application's bundle identifier // The application's bundle identifier
PRODUCT_BUNDLE_IDENTIFIER = studio.smartsheep.goatagent PRODUCT_BUNDLE_IDENTIFIER = dev.solsynth.solaragent
// The copyright displayed in application information // The copyright displayed in application information
PRODUCT_COPYRIGHT = Copyright © 2024 studio.smartsheep. All rights reserved. PRODUCT_COPYRIGHT = Copyright © 2024 dev.solsynth. All rights reserved.

@ -9,7 +9,7 @@
<key>PLIST_VERSION</key> <key>PLIST_VERSION</key>
<string>1</string> <string>1</string>
<key>BUNDLE_ID</key> <key>BUNDLE_ID</key>
<string>studio.smartsheep.goatagent.RunnerTests</string> <string>dev.solsynth.solaragent.RunnerTests</string>
<key>PROJECT_ID</key> <key>PROJECT_ID</key>
<string>smartsheep-hydrogen</string> <string>smartsheep-hydrogen</string>
<key>STORAGE_BUCKET</key> <key>STORAGE_BUCKET</key>

@ -5,10 +5,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: _flutterfire_internals name: _flutterfire_internals
sha256: "1a52f1afae8ab7ac4741425114713bdbba802f1ce1e0648e167ffcc6e05e96cf" sha256: "4eec93681221723a686ad580c2e7d960e1017cf1a4e0a263c2573c2c6b0bf5cd"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.3.21" version: "1.3.25"
archive: archive:
dependency: transitive dependency: transitive
description: description:
@ -117,18 +117,26 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: ffi name: ffi
sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.0" version: "2.1.2"
file:
dependency: transitive
description:
name: file
sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
url: "https://pub.dev"
source: hosted
version: "7.0.0"
firebase_core: firebase_core:
dependency: "direct main" dependency: "direct main"
description: description:
name: firebase_core name: firebase_core
sha256: "7e049e32a9d347616edb39542cf92cd53fdb4a99fb6af0a0bff327c14cd76445" sha256: "53316975310c8af75a96e365f9fccb67d1c544ef0acdbf0d88bbe30eedd1c4f9"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.25.4" version: "2.27.0"
firebase_core_platform_interface: firebase_core_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -141,50 +149,50 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: firebase_core_web name: firebase_core_web
sha256: "57e61d6010e253b36d38191cefd6199d7849152cdcd234b61ca290cdb278a0ba" sha256: c8e1d59385eee98de63c92f961d2a7062c5d9a65e7f45bdc7f1b0b205aab2492
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.11.4" version: "2.11.5"
firebase_crashlytics: firebase_crashlytics:
dependency: "direct main" dependency: "direct main"
description: description:
name: firebase_crashlytics name: firebase_crashlytics
sha256: efd096e4c3d2c568e128505b6e4ce5f5d5a1629f700a4d6fee6bd25b85937dde sha256: c4f1b723d417bc9c4774810e774ff91df8fb0032d33fb2888b2c887e865581b8
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.4.14" version: "3.4.18"
firebase_crashlytics_platform_interface: firebase_crashlytics_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: firebase_crashlytics_platform_interface name: firebase_crashlytics_platform_interface
sha256: "225a54d834a118be262c1f1096d407515e35b99d9b474c987abdcff7663f2b81" sha256: c5a11fca3df76a98e3fa68fde8b10a08aacb9a7639f619fbfd4dad6c67a08643
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.6.21" version: "3.6.25"
firebase_messaging: firebase_messaging:
dependency: "direct main" dependency: "direct main"
description: description:
name: firebase_messaging name: firebase_messaging
sha256: "9c97b20c012542252a8853f11334efd833ddae83551fe37d27f87d885c655038" sha256: e41586e0fd04fe9a40424f8b0053d0832e6d04f49e020cdaf9919209a28497e9
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "14.7.15" version: "14.7.19"
firebase_messaging_platform_interface: firebase_messaging_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: firebase_messaging_platform_interface name: firebase_messaging_platform_interface
sha256: d464b255e922c7915dc4b0ebc305ebad4e1f130519bee3d6e568ef2ea1613a4b sha256: f7a9d74ff7fc588a924f6b2eaeaa148b0db521b13a9db55f6ad45864fa98c06e
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.5.23" version: "4.5.27"
firebase_messaging_web: firebase_messaging_web:
dependency: transitive dependency: transitive
description: description:
name: firebase_messaging_web name: firebase_messaging_web
sha256: f3f71aeec719ec1fe2c99f75cd74d00d33f1c240cf1e402cc9d43883e84f935a sha256: fc21e771166860c55b103701c5ac7cdb2eec28897b97c42e6e5703cbedf9e02e
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.6.4" version: "3.6.8"
flutter: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
@ -194,10 +202,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: flutter_appauth name: flutter_appauth
sha256: "4ad7d446888b1486642226db6aa04ffb4651d76388715aba6e6e572ebeb915c3" sha256: "6aca161b2a1758478a13f758897fc98688277951dafb4b7e62729c1dfbcefdaa"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.0.4" version: "6.0.5"
flutter_appauth_platform_interface: flutter_appauth_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -284,10 +292,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: go_router name: go_router
sha256: "07ee2436909f749d606f53521dc1725dd738dc5196e5ff815bc254253c594075" sha256: "7ecb2f391edbca5473db591b48555a8912dde60edd0fb3013bd6743033b2d3f8"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "13.1.0" version: "13.2.1"
http: http:
dependency: "direct main" dependency: "direct main"
description: description:
@ -308,10 +316,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: image name: image
sha256: "49a0d4b0c12402853d3f227fe7c315601b238d126aa4caa5dbb2dcf99421aa4a" sha256: "4c68bfd5ae83e700b5204c1e74451e7bf3cf750e6843c6e158289cf56bda018e"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.1.6" version: "4.1.7"
js: js:
dependency: transitive dependency: transitive
description: description:
@ -328,6 +336,30 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.8.1" version: "4.8.1"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
url: "https://pub.dev"
source: hosted
version: "10.0.0"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
url: "https://pub.dev"
source: hosted
version: "2.0.1"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
url: "https://pub.dev"
source: hosted
version: "2.0.1"
lints: lints:
dependency: transitive dependency: transitive
description: description:
@ -348,26 +380,26 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: matcher name: matcher
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.12.16" version: "0.12.16+1"
material_color_utilities: material_color_utilities:
dependency: transitive dependency: transitive
description: description:
name: material_color_utilities name: material_color_utilities
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.5.0" version: "0.8.0"
meta: meta:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.10.0" version: "1.11.0"
oauth2: oauth2:
dependency: "direct main" dependency: "direct main"
description: description:
@ -396,10 +428,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: path name: path
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.8.3" version: "1.9.0"
path_provider: path_provider:
dependency: transitive dependency: transitive
description: description:
@ -480,6 +512,62 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.7.4" version: "3.7.4"
shared_preferences:
dependency: "direct main"
description:
name: shared_preferences
sha256: "81429e4481e1ccfb51ede496e916348668fd0921627779233bd24cc3ff6abd02"
url: "https://pub.dev"
source: hosted
version: "2.2.2"
shared_preferences_android:
dependency: transitive
description:
name: shared_preferences_android
sha256: "8568a389334b6e83415b6aae55378e158fbc2314e074983362d20c562780fb06"
url: "https://pub.dev"
source: hosted
version: "2.2.1"
shared_preferences_foundation:
dependency: transitive
description:
name: shared_preferences_foundation
sha256: "7708d83064f38060c7b39db12aefe449cb8cdc031d6062280087bc4cdb988f5c"
url: "https://pub.dev"
source: hosted
version: "2.3.5"
shared_preferences_linux:
dependency: transitive
description:
name: shared_preferences_linux
sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa"
url: "https://pub.dev"
source: hosted
version: "2.3.2"
shared_preferences_platform_interface:
dependency: transitive
description:
name: shared_preferences_platform_interface
sha256: "22e2ecac9419b4246d7c22bfbbda589e3acf5c0351137d87dd2939d984d37c3b"
url: "https://pub.dev"
source: hosted
version: "2.3.2"
shared_preferences_web:
dependency: transitive
description:
name: shared_preferences_web
sha256: "7b15ffb9387ea3e237bb7a66b8a23d2147663d391cafc5c8f37b2e7b4bde5d21"
url: "https://pub.dev"
source: hosted
version: "2.2.2"
shared_preferences_windows:
dependency: transitive
description:
name: shared_preferences_windows
sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59"
url: "https://pub.dev"
source: hosted
version: "2.3.2"
sky_engine: sky_engine:
dependency: transitive dependency: transitive
description: flutter description: flutter
@ -545,26 +633,26 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: url_launcher name: url_launcher
sha256: c512655380d241a337521703af62d2c122bf7b77a46ff7dd750092aa9433499c sha256: "0ecc004c62fd3ed36a2ffcbe0dd9700aee63bd7532d0b642a488b1ec310f492e"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.2.4" version: "6.2.5"
url_launcher_android: url_launcher_android:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_android name: url_launcher_android
sha256: "507dc655b1d9cb5ebc756032eb785f114e415f91557b73bf60b7e201dfedeb2f" sha256: d4ed0711849dd8e33eb2dd69c25db0d0d3fdc37e0a62e629fe32f57a22db2745
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.2.2" version: "6.3.0"
url_launcher_ios: url_launcher_ios:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_ios name: url_launcher_ios
sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03" sha256: "9149d493b075ed740901f3ee844a38a00b33116c7c5c10d7fb27df8987fb51d5"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.2.4" version: "6.2.5"
url_launcher_linux: url_launcher_linux:
dependency: transitive dependency: transitive
description: description:
@ -585,10 +673,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_platform_interface name: url_launcher_platform_interface
sha256: a932c3a8082e118f80a475ce692fde89dc20fddb24c57360b96bc56f7035de1f sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.3.1" version: "2.3.2"
url_launcher_web: url_launcher_web:
dependency: transitive dependency: transitive
description: description:
@ -613,30 +701,38 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.4" version: "2.1.4"
vm_service:
dependency: transitive
description:
name: vm_service
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
url: "https://pub.dev"
source: hosted
version: "13.0.0"
web: web:
dependency: transitive dependency: transitive
description: description:
name: web name: web
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 sha256: "4188706108906f002b3a293509234588823c8c979dc83304e229ff400c996b05"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.3.0" version: "0.4.2"
webview_flutter: webview_flutter:
dependency: "direct main" dependency: "direct main"
description: description:
name: webview_flutter name: webview_flutter
sha256: d81b68e88cc353e546afb93fb38958e3717282c5ac6e5d3be4a4aef9fc3c1413 sha256: "25e1b6e839e8cbfbd708abc6f85ed09d1727e24e08e08c6b8590d7c65c9a8932"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.5.0" version: "4.7.0"
webview_flutter_android: webview_flutter_android:
dependency: transitive dependency: transitive
description: description:
name: webview_flutter_android name: webview_flutter_android
sha256: "4ea3c4e1b8ed590162b15b8a61b41b1ef3ff179a314627c16ce40c086d94b8af" sha256: f038ee2fae73b509dde1bc9d2c5a50ca92054282de17631a9a3d515883740934
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.14.0" version: "3.16.0"
webview_flutter_platform_interface: webview_flutter_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -649,18 +745,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: webview_flutter_wkwebview name: webview_flutter_wkwebview
sha256: b99ca8d8bae9c6b43d568218691aa537fb0aeae1d7d34eadf112a6aa36d26506 sha256: f12f8d8a99784b863e8b85e4a9a5e3cf1839d6803d2c0c3e0533a8f3c5a992a7
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.11.0" version: "3.13.0"
win32: win32:
dependency: transitive dependency: transitive
description: description:
name: win32 name: win32
sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" sha256: "8cb58b45c47dcb42ab3651533626161d6b67a2921917d8d429791f76972b3480"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "5.2.0" version: "5.3.0"
xdg_directories: xdg_directories:
dependency: transitive dependency: transitive
description: description:
@ -686,5 +782,5 @@ packages:
source: hosted source: hosted
version: "3.1.2" version: "3.1.2"
sdks: sdks:
dart: ">=3.2.6 <4.0.0" dart: ">=3.3.0 <4.0.0"
flutter: ">=3.16.6" flutter: ">=3.16.6"

@ -1,5 +1,5 @@
name: goatagent name: solaragent
description: "The official Application of Goatworks Global Hydrogen Network" description: "The official Application of Solarworks Global Hydrogen Network"
# The following line prevents the package from being accidentally published to # The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages. # pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev publish_to: 'none' # Remove this line if you wish to publish to pub.dev
@ -43,9 +43,10 @@ dependencies:
oauth2: ^2.0.2 oauth2: ^2.0.2
http: ^1.2.0 http: ^1.2.0
webview_flutter: ^4.5.0 webview_flutter: ^4.5.0
go_router: ^13.1.0 go_router: ^13.2.1
package_info_plus: ^5.0.1 package_info_plus: ^5.0.1
url_launcher: ^6.2.4 url_launcher: ^6.2.4
shared_preferences: ^2.2.2
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:

@ -8,12 +8,12 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:goatagent/main.dart'; import 'package:solaragent/main.dart';
void main() { void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async { testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame. // Build our app and trigger a frame.
await tester.pumpWidget(const GoatAgent()); await tester.pumpWidget(const SolarAgent());
// Verify that our counter starts at 0. // Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget); expect(find.text('0'), findsOneWidget);

@ -18,18 +18,18 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible"> <meta content="IE=Edge" http-equiv="X-UA-Compatible">
<meta name="description" content="The official Application of Goatworks Global Hydrogen Network"> <meta name="description" content="The official Application of Solarworks Global Hydrogen Network">
<!-- iOS meta tags & icons --> <!-- iOS meta tags & icons -->
<meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="goatagent"> <meta name="apple-mobile-web-app-title" content="solaragent">
<link rel="apple-touch-icon" href="icons/Icon-192.png"> <link rel="apple-touch-icon" href="icons/Icon-192.png">
<!-- Favicon --> <!-- Favicon -->
<link rel="icon" type="image/png" href="favicon.png"/> <link rel="icon" type="image/png" href="favicon.png"/>
<title>goatagent</title> <title>solaragent</title>
<link rel="manifest" href="manifest.json"> <link rel="manifest" href="manifest.json">
<script> <script>

@ -1,11 +1,11 @@
{ {
"name": "goatagent", "name": "solaragent",
"short_name": "goatagent", "short_name": "solaragent",
"start_url": ".", "start_url": ".",
"display": "standalone", "display": "standalone",
"background_color": "#ffffff", "background_color": "#ffffff",
"theme_color": "#49509e", "theme_color": "#49509e",
"description": "The official Application of Goatworks Global Hydrogen Network", "description": "The official Application of Solarworks Global Hydrogen Network",
"orientation": "portrait-primary", "orientation": "portrait-primary",
"prefer_related_applications": false, "prefer_related_applications": false,
"icons": [ "icons": [

@ -1,10 +1,10 @@
# Project-level configuration. # Project-level configuration.
cmake_minimum_required(VERSION 3.14) cmake_minimum_required(VERSION 3.14)
project(goatagent LANGUAGES CXX) project(solaragent LANGUAGES CXX)
# The name of the executable created for the application. Change this to change # The name of the executable created for the application. Change this to change
# the on-disk name of your application. # the on-disk name of your application.
set(BINARY_NAME "goatagent") set(BINARY_NAME "solaragent")
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent # Explicitly opt in to modern CMake behaviors to avoid warnings with recent
# versions of CMake. # versions of CMake.

@ -89,13 +89,13 @@ BEGIN
BEGIN BEGIN
BLOCK "040904e4" BLOCK "040904e4"
BEGIN BEGIN
VALUE "CompanyName", "studio.smartsheep" "\0" VALUE "CompanyName", "dev.solsynth" "\0"
VALUE "FileDescription", "goatagent" "\0" VALUE "FileDescription", "solaragent" "\0"
VALUE "FileVersion", VERSION_AS_STRING "\0" VALUE "FileVersion", VERSION_AS_STRING "\0"
VALUE "InternalName", "goatagent" "\0" VALUE "InternalName", "solaragent" "\0"
VALUE "LegalCopyright", "Copyright (C) 2024 studio.smartsheep. All rights reserved." "\0" VALUE "LegalCopyright", "Copyright (C) 2024 dev.solsynth. All rights reserved." "\0"
VALUE "OriginalFilename", "goatagent.exe" "\0" VALUE "OriginalFilename", "solaragent.exe" "\0"
VALUE "ProductName", "goatagent" "\0" VALUE "ProductName", "solaragent" "\0"
VALUE "ProductVersion", VERSION_AS_STRING "\0" VALUE "ProductVersion", VERSION_AS_STRING "\0"
END END
END END

@ -27,7 +27,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
FlutterWindow window(project); FlutterWindow window(project);
Win32Window::Point origin(10, 10); Win32Window::Point origin(10, 10);
Win32Window::Size size(1280, 720); Win32Window::Size size(1280, 720);
if (!window.Create(L"goatagent", origin, size)) { if (!window.Create(L"solaragent", origin, size)) {
return EXIT_FAILURE; return EXIT_FAILURE;
} }
window.SetQuitOnClose(true); window.SetQuitOnClose(true);