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
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
sdk: flutter
markdown_tooltip: 0.0.10
shared_preferences: ^2.5.4
solidpod: ^0.9.8
solidpod: ^0.9.12
solidui:
path: ..
window_manager: ^0.5.1
Expand Down
6 changes: 6 additions & 0 deletions lib/solidui.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ export 'src/widgets/solid_security_key_central_manager.dart';
export 'src/services/solid_security_key_service.dart';
export 'src/services/solid_security_key_notifier.dart';

export 'src/widgets/secret_text_field.dart';
export 'src/widgets/security_key_ui.dart';
export 'src/widgets/change_key_dialog.dart';

export 'src/utils/snack_bar.dart';

export 'src/widgets/solid_file.dart';
export 'src/widgets/solid_file_browser.dart';
export 'src/widgets/solid_file_uploader.dart';
Expand Down
203 changes: 13 additions & 190 deletions lib/src/constants/ui.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,207 +24,30 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
///
/// Authors: Ashley Tang, Jess Moore
/// Authors: Ashley Tang, Jess Moore, Tony Chen

library;

import 'package:flutter/material.dart';
// Window and list item size constants.

/// Colours used across security dialogs and prompts.
export 'ui_window.dart';

class SecurityColors {
/// Primary colour (Forest Green) used for headings and important elements.
// Colour constants.

static const primary = Color(0xFF2E7D32);
export 'ui_colors.dart';

/// Accent colour (Lighter Green) used for dividers and secondary elements.
// Text style constants.

static const accent = Color(0xFF4CAF50);
export 'ui_text_styles.dart';

/// Background colour (Light Grey) used for dialog backgrounds.
// Layout constants.

static const background = Color(0xFFF5F5F5);
export 'ui_layout.dart';

/// Text colour (Dark Grey) used for main text content.
// String constants.

static const text = Color(0xFF212121);
export 'ui_strings.dart';

/// Grey colour used for labels and secondary text.
// Common constants and helper functions.

static const labelGrey = Colors.grey;
}

/// Text styles used across security dialogs and prompts.

class SecurityTextStyles {
/// Style for main headings (e.g. "Security Key").

static const heading = TextStyle(
fontSize: 22,
fontWeight: FontWeight.bold,
color: SecurityColors.primary,
);

/// Style for regular text content.

static const body = TextStyle(fontSize: 15, color: SecurityColors.text);

/// Style for the WebID display.

static const webId = TextStyle(fontSize: 13, fontWeight: FontWeight.w500);

/// Style for the "Currently logged in as:" label.

static const label = TextStyle(fontSize: 13, color: SecurityColors.labelGrey);

/// Style for button text.

static const button = TextStyle(fontSize: 14, color: Colors.white);
}

/// Layout constants used across security dialogs and prompts.

class SecurityLayout {
/// Horizontal gap between elements.

static const horizontalGap = SizedBox(width: 16);

/// Standard padding for dialog content.

static const contentPadding = EdgeInsets.all(20);

/// Padding for form sections.

static const formPadding = EdgeInsets.fromLTRB(20, 20, 20, 8);

/// Padding for button sections.

static const buttonsPadding = EdgeInsets.fromLTRB(20, 8, 20, 20);

/// Margin for green divider under heading.

static const dividerMargin = EdgeInsets.only(top: 4, bottom: 14);

/// Padding for WebID display.

static const webIdPadding = EdgeInsets.only(top: 4, bottom: 20);

/// Input field spacing.

static const inputFieldSpacing = EdgeInsets.only(bottom: 16);

/// Button padding.

static const buttonPadding = EdgeInsets.symmetric(
horizontal: 16,
vertical: 10,
);

/// Standard width for security dialogs.

static const dialogWidth = 480.0;

/// Maximum width constraint for security dialogs.

static const maxDialogWidth = 500.0;

/// Border radius for cards and buttons.

static const borderRadius = 8.0;

/// Border radius for buttons.

static const buttonRadius = 6.0;

/// Height for divider lines.

static const dividerHeight = 1.5;

/// Height for separator lines.

static const separatorHeight = 1.0;
}

/// Common text strings used across security dialogs and prompts.

class SecurityStrings {
/// Label for the WebID display.

static const webIdLabel = 'Currently logged in as:';

/// Label for not logged in state.

static const notLoggedIn = 'Not logged in';

/// Security key input prompt.

static const securityKeyPrompt =
'Please enter the security key you previously provided for securing your data.';

/// Submit button text.

static const submit = 'Submit';

/// Cancel button text.

static const cancel = 'Cancel';
}

/// Layout constants for scrollbars.

class ScrollbarLayout {
/// Vertical gap between edge widget and scrollbar to avoid
/// horizontal scrollbar overlapping bottom edge of wrapped
/// content.

static const verticalGap = SizedBox(height: 30);

/// Horizontal gap between edge widget and scrollbar to avoid
/// vertical scrollbar overlapping the right edge of wrapped
/// content
///
static const horizontalGap = SizedBox(width: 10);
}

/// Normal height for data loading screens
const double normalLoadingScreenHeight = 200.0;

/// Colours used across dropdown dialogs and prompts.

class DropdownColors {
/// Primary colour (Forest Green) used for dropdown elements

static const primary = Color(0xFF2E7D32);

/// Accent colour (Lighter Green) used for dividers and secondary elements.

static const accent = Color(0xFF4CAF50);
}

/// Layout constants used for WebId dialogs

class WebIdLayout {
/// Vertical gap between paragraphs

static const paraVertGap = SizedBox(height: 10);

/// Standard padding for dialog content.

static const contentPadding = EdgeInsets.symmetric(horizontal: 50);

/// Standard width for security dialogs.

static const dialogWidth = 480.0;

/// Height of dropdown suggestion box.

static const dropdownHeight = 120.0;

/// Elevation of dropdown suggestion cards.

static double dropdownElevation = 5;

/// Padding of dropdown suggestion list.

static const listPadding = EdgeInsets.fromLTRB(0, 5, 0, 5);
}
export 'ui_common.dart';
Loading