Skip to content

Commit

Permalink
chore: Organise repo (#237)
Browse files Browse the repository at this point in the history
chore: Update pubspec to point to icons correctly
  • Loading branch information
thelukewalton committed Jan 14, 2025
1 parent a6ee94c commit 7f48206
Show file tree
Hide file tree
Showing 56 changed files with 108 additions and 65 deletions.
2 changes: 2 additions & 0 deletions dartdoc_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ dartdoc:
"Utils":
markdown: doc/Utils.md
name: Utils
"Interfaces":
name: Interfaces
categoryOrder: ["Components", "Assets", "Theme", "Utils", "Interfaces"]
showUndocumentedCategories: true
4 changes: 0 additions & 4 deletions example/linux/flutter/generated_plugin_registrant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@

#include "generated_plugin_registrant.h"

#include <url_launcher_linux/url_launcher_plugin.h>

void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
}
1 change: 0 additions & 1 deletion example/linux/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

list(APPEND FLUTTER_PLUGIN_LIST
url_launcher_linux
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
Expand Down
2 changes: 0 additions & 2 deletions example/macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ import Foundation
import path_provider_foundation
import shared_preferences_foundation
import sqflite_darwin
import url_launcher_macos

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
}
11 changes: 0 additions & 11 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,11 @@ dependencies:
cached_network_image: ^3.3.1
flutter:
sdk: flutter
flutter_svg: ^2.0.10+1
go_router: ^14.1.2
google_fonts: ^6.2.1
markdown_widget: ^2.3.2+6
path_drawing: ^1.0.1
shared_preferences: ^2.2.2
url_launcher: ^6.2.6
zeta_flutter:
path: ../

dev_dependencies:
flutter_test:
sdk: flutter
widgetbook: ^3.10.0

http: any
flutter:
uses-material-design: true
assets:
Expand Down
3 changes: 0 additions & 3 deletions example/windows/flutter/generated_plugin_registrant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@

#include "generated_plugin_registrant.h"

#include <url_launcher_windows/url_launcher_windows.h>

void RegisterPlugins(flutter::PluginRegistry* registry) {
UrlLauncherWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
}
1 change: 0 additions & 1 deletion example/windows/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

list(APPEND FLUTTER_PLUGIN_LIST
url_launcher_windows
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
Expand Down
3 changes: 1 addition & 2 deletions lib/src/components/avatar_rail/avatar_rail.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

import '../../utils/utils.dart';
import '../avatars/avatar.dart';
import '../../../zeta_flutter.dart';

/// A stateless widget that represents an avatar rail in the Zeta application.
///
Expand Down
3 changes: 3 additions & 0 deletions lib/src/components/avatars/avatar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ enum ZetaAvatarSize {
/// An avatar is a visual representation of a user or entity.
///
/// It is recommended to use [ZetaAvatar] with [ZetaAvatarBadge] for status and notification badges, but any widget can be used.
///
/// {@category Components}
///
/// Figma: https://www.figma.com/file/JesXQFLaPJLc1BdBM4sisI/%F0%9F%A6%93-ZDS---Components?type=design&node-id=20816-388
Expand Down Expand Up @@ -436,6 +437,8 @@ enum ZetaAvatarBadgeType {

/// Badge component used with [ZetaAvatar] as either [ZetaAvatar.upperBadge] or [ZetaAvatar.lowerBadge].
///
/// {@category Components}
///
/// Sizes and styles are managed by the parent [ZetaAvatar].
class ZetaAvatarBadge extends StatelessWidget {
/// Constructor for [ZetaAvatarBadge]
Expand Down
2 changes: 2 additions & 0 deletions lib/src/components/bottom sheets/bottom_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ class ZetaBottomSheet extends ZetaStatelessWidget {
/// Function to show [ZetaBottomSheet].
///
/// Uses [showModalBottomSheet] for functionality, but with Zeta styling and simplified functionality.
///
/// {@category Components}
Future<T?> showZetaBottomSheet<T>({
required BuildContext context,
String? title,
Expand Down
2 changes: 2 additions & 0 deletions lib/src/components/breadcrumb/breadcrumb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ class _ZetaBreadcrumbsState extends State<ZetaBreadcrumb> {
/// Class for untruncated [ZetaBreadcrumbItem].
///
/// Should be a child of [ZetaBreadcrumb].
///
/// {@category Components}
class ZetaBreadcrumbItem extends ZetaStatelessWidget {
///Constructor for [ZetaBreadcrumbItem]
ZetaBreadcrumbItem({
Expand Down
4 changes: 3 additions & 1 deletion lib/src/components/button_group/button_group.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ class ZetaButtonGroup extends ZetaStatelessWidget {
// TODO(UX-854): Create country variant.
// TODO(UX-1132): Refactor to make group button a class, not a widget.

/// Group Button item
/// Group Button item.
///
/// {@category Components}
class ZetaGroupButton extends ZetaStatefulWidget {
/// Public Constructor for [ZetaGroupButton]
const ZetaGroupButton({
Expand Down
1 change: 1 addition & 0 deletions lib/src/components/buttons/button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

import '../../../zeta_flutter.dart';
import 'button_style.dart';

/// Zeta Button
/// {@category Components}
Expand Down
1 change: 1 addition & 0 deletions lib/src/components/buttons/icon_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

import '../../../zeta_flutter.dart';
import 'button_style.dart';

/// Component [ZetaIconButton]
/// {@category Components}
Expand Down
2 changes: 2 additions & 0 deletions lib/src/components/chat_item/chat_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,8 @@ enum _ZetaSlidableActionType {
}

/// Slidable action widget for [ZetaChatItem].
///
/// {@category Components}
class ZetaSlidableAction extends StatelessWidget {
/// Constructs a [ZetaSlidableAction].
const ZetaSlidableAction({
Expand Down
3 changes: 3 additions & 0 deletions lib/src/components/checkbox/checkbox.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import '../../../zeta_flutter.dart';
/// Widgets that use a checkbox should listen for the [onChanged] callback and
/// rebuild the checkbox with a new [value] to update the visual appearance of
/// the checkbox.
///
/// {@category Components}
///
/// Figma: https://www.figma.com/file/JesXQFLaPJLc1BdBM4sisI/%F0%9F%A6%93-ZDS---Components?node-id=21510-54003
Expand Down Expand Up @@ -95,6 +96,8 @@ class ZetaCheckbox extends FormField<bool> {
}

/// [FormFieldState] for [ZetaCheckbox].
///
/// {@category Components}
class ZetaCheckboxFormFieldState extends FormFieldState<bool> {
@override
ZetaCheckbox get widget => super.widget as ZetaCheckbox;
Expand Down
10 changes: 6 additions & 4 deletions lib/src/components/chips/chip.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ import 'package:flutter/material.dart';

import '../../../zeta_flutter.dart';

export './assist_chip.dart';
export './filter_chip.dart';
export './input_chip.dart';
export './status_chip.dart';
export 'assist_chip.dart';
export 'filter_chip.dart';
export 'input_chip.dart';
export 'status_chip.dart';

/// This covers the broad functionality of [ZetaAssistChip], [ZetaFilterChip] and [ZetaInputChip].
///
/// If [selected] is not null, the chip will have the toggle behavior of [ZetaFilterChip].
///
/// {@category Components}
class ZetaChip extends ZetaStatefulWidget {
/// Constructs a [ZetaChip].
const ZetaChip({
Expand Down
2 changes: 1 addition & 1 deletion lib/src/components/components.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export 'bottom sheets/menu_items.dart';
export 'breadcrumb/breadcrumb.dart' hide TruncatedItem;
export 'button_group/button_group.dart';
export 'buttons/button.dart';
export 'buttons/button_style.dart';
export 'buttons/button_style.dart' show ZetaButtonType;
export 'buttons/icon_button.dart';
export 'chat_item/chat_item.dart';
export 'chat_item/contact_item.dart';
Expand Down
1 change: 0 additions & 1 deletion lib/src/components/date_input/date_input.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import 'package:intl/intl.dart';
import 'package:mask_text_input_formatter/mask_text_input_formatter.dart';

import '../../../zeta_flutter.dart';
import '../../interfaces/form_field.dart';
import '../buttons/input_icon_button.dart';
import '../text_input/internal_text_input.dart';

Expand Down
3 changes: 3 additions & 0 deletions lib/src/components/dial_pad/dial_pad.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:flutter/rendering.dart';
import '../../../zeta_flutter.dart';

/// Dial pad gives the user the ability to dial a number and start a call. It also has a quick dial security action and a delete entry action.
///
/// {@category Components}
///
/// Figma: https://www.figma.com/design/JesXQFLaPJLc1BdBM4sisI/%F0%9F%A6%93-ZDS---Components?node-id=21156-16370&node-type=canvas&m=dev
Expand Down Expand Up @@ -148,6 +149,8 @@ class _ZetaDialPadState extends State<ZetaDialPad> {
}

/// Individual button for [ZetaDialPad].
///
/// {@category Components}
class ZetaDialPadButton extends StatelessWidget {
/// Constructs a [ZetaDialPadButton]
const ZetaDialPadButton({
Expand Down
4 changes: 4 additions & 0 deletions lib/src/components/dialog/dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ enum ZetaDialogHeaderAlignment {
}

/// Function to show a Zeta dialog.
///
/// Uses [showDialog] to show a dialog with the [ZetaDialog] widget.
///
/// @{category Components}
Future<bool?> showZetaDialog(
BuildContext context, {
ZetaDialogHeaderAlignment headerAlignment = ZetaDialogHeaderAlignment.center,
Expand Down
4 changes: 3 additions & 1 deletion lib/src/components/dropdown/dropdown.dart
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ enum _MenuPosition {
down,
}

/// The state for a [ZetaDropdown]
/// The state for a [ZetaDropdown].
///
/// {@category Components}
class ZetaDropDownState<T> extends State<ZetaDropdown<T>> {
late final _DropdownControllerImpl _dropdownController;
final OverlayPortalController _overlayPortalController = OverlayPortalController();
Expand Down
2 changes: 2 additions & 0 deletions lib/src/components/list_item/notification_list_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ extension on Image {

// TODO(UX-1138): Can this be refactored to use ZetaIndicator?
/// Badge item for notification list items. Can be an avatar, icon or image
///
/// {@category Components}
class ZetaNotificationBadge extends StatelessWidget {
/// Constructs a notification badge with an avatar.
const ZetaNotificationBadge.avatar({
Expand Down
3 changes: 3 additions & 0 deletions lib/src/components/navigation bar/navigation_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import '../../../zeta_flutter.dart';
const double _navigationItemBorderWidth = 1;

/// An item to be used in a [ZetaNavigationBar].
///
/// {@category Components}
class ZetaNavigationBarItem {
/// Creates a new [ZetaNavigationBarItem]
const ZetaNavigationBarItem({
Expand All @@ -25,6 +27,7 @@ class ZetaNavigationBarItem {
}

/// Navigation Bars (Bottom navigation) allow movement between primary destinations in an app.
///
/// {@category Components}
///
/// Figma: https://www.figma.com/design/JesXQFLaPJLc1BdBM4sisI/%F0%9F%A6%93-ZDS---Components?node-id=1052-24751&node-type=canvas&m=dev
Expand Down
4 changes: 4 additions & 0 deletions lib/src/components/navigation_rail/navigation_rail.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import '../../../zeta_flutter.dart';
/// sections of an app. It is designed to be used as a side navigation
/// menu and can be customized with different icons and labels for each
/// navigation item.
///
/// Should be used with [ZetaNavigationRailItem].
///
/// {@category Components}
///
/// Figma: https://www.figma.com/design/JesXQFLaPJLc1BdBM4sisI/%F0%9F%A6%93-ZDS---Components?node-id=229-43&node-type=canvas&m=dev
Expand Down Expand Up @@ -262,6 +264,8 @@ class _ZetaNavigationRailItemContentState extends State<_ZetaNavigationRailItemC
}

/// Represents an item in the [ZetaNavigationRail].
/// {@category Components}
class ZetaNavigationRailItem {
/// Constructor for [ZetaNavigationRailItem].
const ZetaNavigationRailItem({
Expand Down
1 change: 0 additions & 1 deletion lib/src/components/password/password_input.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

import '../../../zeta_flutter.dart';
import '../../interfaces/form_field.dart';
import '../text_input/internal_text_input.dart';

/// Zeta Password Input
Expand Down
19 changes: 1 addition & 18 deletions lib/src/components/phone_input/phone_input.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,10 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

import '../../../zeta_flutter.dart';

import '../../interfaces/form_field.dart';
import '../text_input/internal_text_input.dart';
import 'countries.dart';

/// A phone number.
class PhoneNumber {
/// Creates a new [PhoneNumber].
const PhoneNumber({
required this.dialCode,
required this.number,
});

/// The dial code of the phone number.
final String dialCode;

/// The number of the phone number.
final String number;
}

/// ZetaPhoneInput allows entering phone numbers.
///
/// {@category Components}
///
/// Figma: https://www.figma.com/design/JesXQFLaPJLc1BdBM4sisI/%F0%9F%A6%93-ZDS---Components?node-id=916-10934&node-type=canvas&m=dev
Expand Down
4 changes: 3 additions & 1 deletion lib/src/components/range_selector/range_selector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import '../../../zeta_flutter.dart';
/// The [ZetaRangeSelector] is a customizable range selector widget that
/// allows users to select a range of values within a specified minimum
/// and maximum range. It provides a visual representation of the selected
/// range and allows for precise adjustments through both dragging and direct input
/// range and allows for precise adjustments through both dragging and direct input.
///
/// {@category Components}
class ZetaRangeSelector extends ZetaStatefulWidget {
/// Creates a new [ZetaRangeSelector]
ZetaRangeSelector({
Expand Down
3 changes: 2 additions & 1 deletion lib/src/components/screen_header_bar/screen_header_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import '../../../zeta_flutter.dart';

/// [ZetaScreenHeaderBar]
/// A screen header bar that contains a back button, title and an optional action button.
///
/// {@category Components}
///
/// Figma: https://www.figma.com/design/JesXQFLaPJLc1BdBM4sisI/%F0%9F%A6%93-ZDS---Components?node-id=24601-6781&node-type=canvas&m=dev
Expand Down
1 change: 0 additions & 1 deletion lib/src/components/search_bar/search_bar.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import '../../../zeta_flutter.dart';
import '../../interfaces/form_field.dart';
import '../buttons/input_icon_button.dart';
import '../text_input/internal_text_input.dart';

Expand Down
1 change: 0 additions & 1 deletion lib/src/components/select_input/select_input.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

import '../../../zeta_flutter.dart';
import '../../interfaces/form_field.dart';
import '../buttons/input_icon_button.dart';
import '../dropdown/dropdown_controller.dart';
import '../text_input/internal_text_input.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/src/components/stepper/stepper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,8 @@ class VerticalStep extends StatelessWidget {
/// Zeta step used in [ZetaStepper]. The step can have a title and subtitle,
/// an icon within its circle, some content and a state that governs its
/// styling.
///
/// {@category Components}
class ZetaStep {
/// Creates a step for a [ZetaStepper].
const ZetaStep({
Expand Down
2 changes: 1 addition & 1 deletion lib/src/components/text_input/text_input.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

import '../../../zeta_flutter.dart';
import '../../interfaces/form_field.dart';
import 'internal_text_input.dart';

/// Text inputs allow the user to enter text.
///
/// To show error messages on the text input, use the [validator]. The string returned from this function will be displayed as the error message.
/// Error messages can also be managed outside the text input by setting [errorText].
///
/// {@category Components}
///
/// Figma: https://www.figma.com/design/JesXQFLaPJLc1BdBM4sisI/%F0%9F%A6%93-ZDS---Components?node-id=229-38&node-type=canvas&m=dev
Expand Down
Loading

0 comments on commit 7f48206

Please sign in to comment.