Skip to content
Merged
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
59 changes: 59 additions & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
generated*
Generated*
pubspec.lock
*~
ignore

# Platform-specific build folders
/android/
/ios/
/linux/
/macos/
/windows/
/web/

# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.build/
.buildlog/
.history
.svn/
.swiftpm/
migrate_working_dir/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.pub-cache/
.pub/
/build/

# Symbolication related
app.*.symbols

# Obfuscation related
app.*.map.json

# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
30 changes: 30 additions & 0 deletions example/.metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.

version:
revision: "3b62efc2a3da49882f43c372e0bc53daef7295a6"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
base_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
- platform: web
create_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
base_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
83 changes: 83 additions & 0 deletions example/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
########################################################################
#
# Generic Makefile
#
# Time-stamp: <Thursday 2024-11-14 07:34:13 +1100 Graham Williams>
#
# Copyright (c) Graham.Williams@togaware.com
#
# License: Creative Commons Attribution-ShareAlike 4.0 International.
#
########################################################################

# App is often the current directory name.
#
# App version numbers
# Major release
# Minor update
# Trivial update or bug fix

APP=$(shell pwd | xargs basename)
VER=
DATE=$(shell date +%Y-%m-%d)

# Identify a destination used by install.mk

DEST=/var/www/html/$(APP)

########################################################################
# Supported Makefile modules.

# Often the support Makefiles will be in the local support folder, or
# else installed in the local user's shares.

INC_BASE=../support

# Specific Makefiles will be loaded if they are found in
# INC_BASE. Sometimes the INC_BASE is shared by multiple local
# Makefiles and we want to skip specific makes. Simply define the
# appropriate INC to a non-existant location and it will be skipped.

INC_DOCKER=skip
INC_MLHUB=skip
INC_WEBCAM=skip

# Load any modules available.

INC_MODULE=$(INC_BASE)/modules.mk

ifneq ("$(wildcard $(INC_MODULE))","")
include $(INC_MODULE)
endif

########################################################################
# HELP
#
# Help for targets defined in this Makefile.

define HELP
$(APP):

locals No local targets defined yet.

endef
export HELP

help::
@echo "$$HELP"

########################################################################
# LOCAL TARGETS

locals:
@echo "This might be the instructions to install $(APP)"

apk::
rsync -avzh installers/$(APP)* solidcommunity.au:/var/www/html/installers/
ssh solidcommunity.au chmod -R go+rX /var/www/html/installers/
ssh solidcommunity.au chmod go=x /var/www/html/installers/

tgz::
rsync -avzh installers/$(APP)* solidcommunity.au:/var/www/html/installers/
ssh solidcommunity.au chmod -R go+rX /var/www/html/installers/
ssh solidcommunity.au chmod go=x /var/www/html/installers/
7 changes: 7 additions & 0 deletions example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# A Demonstrator of SolidPod Functionality

Through this app we demonstrate the suite of functionality provided by
the solidpod package.

Visit the [AU Solid Community](https://solidcommunity.au) for a suite
of solidpod apps developed using the solidpod package.
28 changes: 28 additions & 0 deletions example/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at https://dart.dev/lints.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
Binary file added example/assets/images/demopod_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/assets/images/demopod_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions example/lib/constants/app.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/// Constants used throughout the app.
///
// Time-stamp: <Wednesday 2024-05-15 10:07:05 +1000 Graham Williams>
///
/// Copyright (C) 2024, Software Innovation Institute, ANU.
///
/// Licensed under the GNU General Public License, Version 3 (the "License").
///
/// License: https://opensource.org/license/gpl-3-0.
//
// This program is free software: you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation, either version 3 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <https://opensource.org/license/gpl-3-0>.
///
/// Authors: Graham Williams

library;

import 'package:flutter/material.dart';

const titleBackgroundColor = Color(0xFFF0E4D7);

// const dataFile = 'key-value.ttl';
const dataFile = 'keyvalue/key-value.ttl';

//const dataFilePlain = 'key-value-plain.ttl';
const dataFilePlain = dataFile;

String createDemoTtlStr(String fileName) {
return '''@prefix demo: <#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .

demo:sampleData$fileName a demo:DemoResource ;
rdfs:label "Demo File $fileName" ;
demo:created "${DateTime.now().toIso8601String()}" ;
demo:description "This is a file containing some demo ttl content" ;
foaf:maker "Solid Demo" .

demo:exampleData$fileName
demo:sampleProperty "Sample value" ;
demo:category "demo-data".
''';
}
61 changes: 61 additions & 0 deletions example/lib/dialogs/about.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/// about dialog for the app
///
// Time-stamp: <Thursday 2024-06-27 13:38:24 +1000 Graham Williams>
///
/// Copyright (C) 2024, Software Innovation Institute, ANU.
///
/// Licensed under the GNU General Public License, Version 3 (the "License").
///
/// License: https://opensource.org/license/gpl-3-0.
//
// This program is free software: you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation, either version 3 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <https://opensource.org/license/gpl-3-0>.
///
/// Authors: Kevin Wang

library;

import 'package:flutter/material.dart';

import 'package:solidpod/solidpod.dart';

Future<void> aboutDialog(BuildContext context) async {
final appInfo = await getAppNameVersion();

// Fix the use_build_context_synchronously lint error.

if (context.mounted) {
showAboutDialog(
context: context,
applicationName:
'${appInfo.name[0].toUpperCase()}${appInfo.name.substring(1)}',
applicationVersion: appInfo.version,
applicationLegalese: '© 2024 Software Innovation Institute ANU',
applicationIcon: Image.asset(
'assets/images/demopod_logo.png',
width: 100,
height: 100,
),
children: [
const SizedBox(
width: 300, // Limit the width.
child: SelectableText('\nA demostrator of SolidPod functionality.\n\n'
'Demopod is a demonstrator app for the solidpod package.'
' It provides a collection of buttons to exhibit the different'
' calabilities provided by solidpod.\n\n'
'Authors: Anuska Vidanage, Graham Williams, Dawei Chen.'),
),
],
);
}
}
44 changes: 44 additions & 0 deletions example/lib/dialogs/alert.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/// Show an Alert dialog
///
/// Copyright (C) 2024, Software Innovation Institute, ANU.
///
/// Licensed under the GNU General Public License, Version 3 (the "License").
///
/// License: https://opensource.org/license/gpl-3-0.
//
// This program is free software: you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation, either version 3 of the License, or (at your option) any later
// version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
// details.
//
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <https://opensource.org/license/gpl-3-0>.
///
/// Authors: Dawei Chen

library;

import 'package:flutter/material.dart';

// Show an alert dialog
Future<void> alert(BuildContext context, String msg,
[String title = 'Notice']) async {
await showDialog(
context: context,
builder: (context) => AlertDialog(
title: Text(title),
content: Text(msg),
actions: [
ElevatedButton(
onPressed: () {
Navigator.pop(context);
},
child: const Text('OK'))
],
));
}
Loading
Loading