This commit is contained in:
2025-02-12 14:12:23 +02:00
parent 40f17efd30
commit 65f4c0ee6c
12 changed files with 646 additions and 229 deletions

View File

@@ -1,7 +1,9 @@
# This is a generated file; do not edit or check into version control. # This is a generated file; do not edit or check into version control.
path_provider=C:\\Users\\micwa\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\path_provider-2.1.3\\ path_provider=C:\\Users\\micwa\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\path_provider-2.1.5\\
path_provider_android=C:\\Users\\micwa\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\path_provider_android-2.2.6\\ path_provider_android=C:\\Users\\micwa\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\path_provider_android-2.2.15\\
path_provider_foundation=C:\\Users\\micwa\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\path_provider_foundation-2.4.0\\ path_provider_foundation=C:\\Users\\micwa\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\path_provider_foundation-2.4.1\\
path_provider_linux=C:\\Users\\micwa\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\path_provider_linux-2.2.1\\ path_provider_linux=C:\\Users\\micwa\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\path_provider_linux-2.2.1\\
path_provider_windows=C:\\Users\\micwa\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\path_provider_windows-2.2.1\\ path_provider_windows=C:\\Users\\micwa\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\path_provider_windows-2.3.0\\
sqflite=C:\\Users\\micwa\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\sqflite-2.3.3+1\\ sqflite=C:\\Users\\micwa\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\sqflite-2.4.1\\
sqflite_android=C:\\Users\\micwa\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\sqflite_android-2.4.0\\
sqflite_darwin=C:\\Users\\micwa\\AppData\\Local\\Pub\\Cache\\hosted\\pub.dev\\sqflite_darwin-2.4.1+1\\

View File

@@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\micwa\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_foundation-2.4.0\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\micwa\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\sqflite-2.3.3+1\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"path_provider_android","path":"C:\\\\Users\\\\micwa\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_android-2.2.6\\\\","native_build":true,"dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\micwa\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\sqflite-2.3.3+1\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\micwa\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_foundation-2.4.0\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\micwa\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\sqflite-2.3.3+1\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\Users\\\\micwa\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_linux-2.2.1\\\\","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\Users\\\\micwa\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_windows-2.2.1\\\\","native_build":false,"dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"sqflite","dependencies":[]}],"date_created":"2025-02-09 15:39:20.757997","version":"3.27.1","swift_package_manager_enabled":false} {"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\micwa\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_foundation-2.4.1\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"sqflite_darwin","path":"C:\\\\Users\\\\micwa\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\sqflite_darwin-2.4.1+1\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"path_provider_android","path":"C:\\\\Users\\\\micwa\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_android-2.2.15\\\\","native_build":true,"dependencies":[]},{"name":"sqflite_android","path":"C:\\\\Users\\\\micwa\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\sqflite_android-2.4.0\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\micwa\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_foundation-2.4.1\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"sqflite_darwin","path":"C:\\\\Users\\\\micwa\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\sqflite_darwin-2.4.1+1\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\Users\\\\micwa\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_linux-2.2.1\\\\","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\Users\\\\micwa\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_windows-2.3.0\\\\","native_build":false,"dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"sqflite","dependencies":["sqflite_android","sqflite_darwin"]},{"name":"sqflite_android","dependencies":[]},{"name":"sqflite_darwin","dependencies":[]}],"date_created":"2025-02-12 14:12:18.753025","version":"3.27.1","swift_package_manager_enabled":false}

38
.gitignore vendored
View File

@@ -1,3 +1,20 @@
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# Flutter/Dart/Pub related
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
/pubspec.lock
**/doc/api/
.dart_tool/
build/
# FVM Version Cache
.fvm/
# Miscellaneous # Miscellaneous
*.class *.class
*.log *.log
@@ -9,24 +26,3 @@
.history .history
.svn/ .svn/
migrate_working_dir/ 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
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
/pubspec.lock
**/doc/api/
.dart_tool/
build/
# FVM Version Cache
.fvm/

View File

@@ -1,29 +1,32 @@
## Atromic Elements ## Astromic Elements
The elements module of the **Astromic** Presentation System The elements module of the **Astromic** Presentation System
Developed, Maintained, and is property of Michael W. Aziz (Micazi) Developed, Maintained, and is property of Michael W. Aziz (Micazi)
### Content ### Content
- Spacing - Buttons
- VSB,HSB ☑️ - Base ☑️
- Flexer ☑️ - State Button ☑️
- Divider ☑️ - Icon Button ☑️
- Widgets - Link Button ☑️
- Image ☑️ - Fields
- Scaffold ☑️ - Base ☑️
- Blur ☑️ - Text Field ☑️
- Action Field ☑️
- Selectors - Selectors
- Radio ☑️ - Radio ☑️
- Chip ☑️ - Chip ☑️
- Toggles - Toggles
- Checkbox ☑️ - Checkbox ☑️
- Switcher ☑️ - Switcher ☑️
- Custom ☑️ - Spacing
- Buttons - VSB,HSB ☑️
- Base ☑️ - Divider ☑️
- Icon Button ☑️ - Flexer ☑️
- State Button ☑️ - Widgets
- Link Button ☑️ - Image ☑️
- Fields - Blur ☑️
- Text Field ☑️ - AppBar
- Scaffold
- SliverScaffold

View File

@@ -1,9 +1,11 @@
library astromic_elements; library astromic_elements;
export 'src/spacing/spacing.astromic.dart';
export 'src/widgets/widgets.astromic.dart';
export 'src/selectors/selectors.astromic.dart';
export 'src/toggles/toggles.astromic.dart';
export 'src/buttons/buttons.astromic.dart'; export 'src/buttons/buttons.astromic.dart';
export 'src/fields/fields.astromic.dart'; export 'src/fields/fields.astromic.dart';
export 'package:flutter_svg/flutter_svg.dart' show SvgPicture, BytesLoader, SvgAssetLoader; //Needed for assets manipulation export 'src/selectors/selectors.astromic.dart';
export 'src/toggles/toggles.astromic.dart';
//
export 'src/spacing/spacing.astromic.dart';
export 'src/widgets/widgets.astromic.dart';
export 'package:flutter_svg/flutter_svg.dart' show SvgPicture, BytesLoader, SvgAssetLoader; //Needed for assets manipulations.
export 'dependencies/gradient_border/gradient_borders.dart' show GradientBoxBorder, GradientOutlineInputBorder; //Needed for gradient borders manipulations.

View File

@@ -0,0 +1,43 @@
// //s1 Imports
// //s2 Core Package Imports
// import 'package:flutter/material.dart';
// //s2 1st-party Package Imports
// //s2 3rd-party Package Imports
// //s2 Dependancies Imports
// //s3 Routes
// //s3 Services
// //s3 Models
// //s1 Exports
// class AstromicAppBar extends StatelessWidget {
// //SECTION - Widget Arguments
// //!SECTION
// //
// const AstromicAppBar({
// super.key,
// });
// @override
// Widget build(BuildContext context) {
// //SECTION - Build Setup
// //s1 -Values
// //double w = MediaQuery.of(context).size.width;
// //double h = MediaQuery.of(context).size.height;
// //s1 -Values
// //
// //s1 -Widgets
// //s1 -Widgets
// //!SECTION
// //SECTION - Build Return
// return Scaffold(
// body: Container(),
// );
// //!SECTION
// }
// //SECTION - Helper Functions
// // Build the leading widget
// Widget? _buildLeading() {}
// //!SECTION
// }

View File

@@ -1,39 +1,85 @@
//s1 Imports
//s2 Core Package Imports
import 'dart:ui'; import 'dart:ui';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
//s2 1st-party Package Imports
//s2 3rd-party Package Imports
//s2 Dependancies Imports
//s3 Routes
//s3 Services
//s3 Models
//s1 Exports
Widget astromicBlurEffect( class AstromicBlur extends StatelessWidget {
Widget child, //SECTION - Widget Arguments
double sigmaX, final Widget child;
double sigmaY, { final (double x, double y)? sigma;
Widget? topChild, final TileMode? tileMode;
Color? overlayColor = const Color.fromRGBO(0, 0, 0, 0.1), final Color? overlayColor;
TileMode? tileMode = TileMode.mirror, final Gradient? overlayGradient;
List<BoxShadow>? shadow, final BorderRadius? radius;
BorderRadius? radius, final List<BoxShadow>? shadow;
}) => final Widget? childOnTop;
Container( //!SECTION
//
const AstromicBlur({
super.key,
required this.child,
this.sigma = (5, 5),
this.tileMode = TileMode.clamp,
this.overlayColor,
this.overlayGradient,
this.radius,
this.shadow,
this.childOnTop,
});
@override
Widget build(BuildContext context) {
//SECTION - Build Setup
//s1 -Values
//double w = MediaQuery.of(context).size.width;
//double h = MediaQuery.of(context).size.height;
//s1 -Values
//
//s1 -Widgets
//s1 -Widgets
//!SECTION
//SECTION - Build Return
return Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: radius,
boxShadow: shadow, boxShadow: shadow,
), ),
child: ClipRRect( child: ClipRRect(
borderRadius: radius ?? BorderRadius.zero, borderRadius: radius ?? BorderRadius.zero,
child: Stack( child: Stack(
fit: StackFit.expand,
children: [ children: [
child, child, // The main widget goes under the blurred background
BackdropFilter( BackdropFilter(
filter: ImageFilter.blur( filter: ImageFilter.blur(sigmaX: sigma!.$1, sigmaY: sigma!.$2),
sigmaX: 5.0, child: Container(decoration: BoxDecoration(color: overlayColor, gradient: overlayGradient)),
sigmaY: 5.0,
tileMode: TileMode.mirror,
),
child: Container(
decoration: BoxDecoration(
color: overlayColor,
),
),
), ),
topChild ?? Container(), childOnTop ?? Container(),
], ],
), ),
), ),
); );
//!SECTION
}
}
extension BlurExtension on Widget {
Widget blur({
(double x, double y)? sigma,
TileMode? tileMode,
Color? overlayColor,
Gradient? overlayGradient,
BorderRadius? radius,
List<BoxShadow>? shadow,
Widget? childOnTop,
}) =>
AstromicBlur(child: this, sigma: sigma, tileMode: tileMode, overlayColor: overlayColor, overlayGradient: overlayGradient, radius: radius, shadow: shadow, childOnTop: childOnTop);
}

View File

@@ -1,76 +1,113 @@
import 'package:flutter/material.dart'; // //s1 Imports
// //s2 Core Package Imports
// import 'package:flutter/material.dart';
// //s2 1st-party Package Imports
// //s2 3rd-party Package Imports
// //s2 Dependancies Imports
// //s3 Routes
// //s3 Services
// //s3 Models
// //s1 Exports
// // class AstromicScaffold extends StatelessWidget {
Widget astromicScaffold({ // //SECTION - Widget Arguments
//S1 -- AppBar // //!SECTION
PreferredSizeWidget? appBar, // //
bool isAppbarStacked = false, // const AstromicScaffold({
//S1 -- FAB // super.key,
Widget? floatingActionButton, // });
FloatingActionButtonLocation? floatingActionButtonLocation,
//S1 -- Other Integral Components // @override
Widget? drawer, // Widget build(BuildContext context) {
Widget? bottomNavigationBar, // //SECTION - Build Setup
Widget? bottomSheet, // //s1 -Values
//S1 -- Styling // //double w = MediaQuery.of(context).size.width;
Color? backgroundColor, // //double h = MediaQuery.of(context).size.height;
EdgeInsetsGeometry? padding, // //s1 -Values
ScrollPhysics? scrollPhysics = const BouncingScrollPhysics(), // //
//S1 -- Configs // //s1 -Widgets
bool withSafeArea = false, // //s1 -Widgets
bool extendBody = false, // //!SECTION
bool resizeToAvoidBottomInset = true,
bool withScrollView = false, // //SECTION - Build Return
bool closeKeyboardOnTap = true, // return Scaffold(
// // body: Container(),
Widget? body, // );
// // //!SECTION
}) { // }
assert(!withScrollView || (withScrollView && body is Column), 'Make sure you add a column in the body section!'); // }
//
return Scaffold( // //
backgroundColor: backgroundColor, // Widget astromicScaffold({
// // //S1 -- AppBar
appBar: isAppbarStacked ? null : appBar, // PreferredSizeWidget? appBar,
floatingActionButton: floatingActionButton, // bool isAppbarStacked = false,
floatingActionButtonLocation: floatingActionButtonLocation, // //S1 -- FAB
drawer: drawer, // Widget? floatingActionButton,
bottomNavigationBar: bottomNavigationBar, // FloatingActionButtonLocation? floatingActionButtonLocation,
bottomSheet: bottomSheet, // //S1 -- Other Integral Components
// // Widget? drawer,
resizeToAvoidBottomInset: resizeToAvoidBottomInset, // Widget? bottomNavigationBar,
extendBody: extendBody, // Widget? bottomSheet,
body: Stack( // //S1 -- Styling
children: [ // Color? backgroundColor,
GestureDetector( // EdgeInsetsGeometry? padding,
onTap: !withScrollView && closeKeyboardOnTap ? () => FocusManager.instance.primaryFocus?.unfocus() : null, // ScrollPhysics? scrollPhysics = const BouncingScrollPhysics(),
child: withSafeArea // //S1 -- Configs
? SafeArea( // bool withSafeArea = false,
child: withScrollView // bool extendBody = false,
? SingleChildScrollView( // bool resizeToAvoidBottomInset = true,
keyboardDismissBehavior: closeKeyboardOnTap ? ScrollViewKeyboardDismissBehavior.onDrag : ScrollViewKeyboardDismissBehavior.manual, // bool withScrollView = false,
physics: scrollPhysics, // bool closeKeyboardOnTap = true,
padding: padding ?? EdgeInsets.zero, // //
child: body, // Widget? body,
) // //
: Padding( // }) {
padding: padding ?? EdgeInsets.zero, // assert(!withScrollView || (withScrollView && body is Column), 'Make sure you add a column in the body section!');
child: body, // //
), // return Scaffold(
) // backgroundColor: backgroundColor,
: withScrollView // //
? SingleChildScrollView( // appBar: isAppbarStacked ? null : appBar,
keyboardDismissBehavior: closeKeyboardOnTap ? ScrollViewKeyboardDismissBehavior.onDrag : ScrollViewKeyboardDismissBehavior.manual, // floatingActionButton: floatingActionButton,
padding: padding ?? EdgeInsets.zero, // floatingActionButtonLocation: floatingActionButtonLocation,
child: body, // drawer: drawer,
) // bottomNavigationBar: bottomNavigationBar,
: Padding( // bottomSheet: bottomSheet,
padding: padding ?? EdgeInsets.zero, // //
child: body, // resizeToAvoidBottomInset: resizeToAvoidBottomInset,
), // extendBody: extendBody,
), // body: Stack(
isAppbarStacked && appBar != null ? Wrap(children: [appBar]) : Container(), // children: [
], // GestureDetector(
), // onTap: !withScrollView && closeKeyboardOnTap ? () => FocusManager.instance.primaryFocus?.unfocus() : null,
); // child: withSafeArea
} // ? SafeArea(
// child: withScrollView
// ? SingleChildScrollView(
// keyboardDismissBehavior: closeKeyboardOnTap ? ScrollViewKeyboardDismissBehavior.onDrag : ScrollViewKeyboardDismissBehavior.manual,
// physics: scrollPhysics,
// padding: padding ?? EdgeInsets.zero,
// child: body,
// )
// : Padding(
// padding: padding ?? EdgeInsets.zero,
// child: body,
// ),
// )
// : withScrollView
// ? SingleChildScrollView(
// keyboardDismissBehavior: closeKeyboardOnTap ? ScrollViewKeyboardDismissBehavior.onDrag : ScrollViewKeyboardDismissBehavior.manual,
// padding: padding ?? EdgeInsets.zero,
// child: body,
// )
// : Padding(
// padding: padding ?? EdgeInsets.zero,
// child: body,
// ),
// ),
// isAppbarStacked && appBar != null ? Wrap(children: [appBar]) : Container(),
// ],
// ),
// );
// }

View File

@@ -0,0 +1,284 @@
// //SECTION - Imports
// //
// //s1 PACKAGES
// //---------------
// //s2 CORE
// import 'dart:io';
// import 'dart:ui';
// import 'package:flutter/material.dart';
// import 'package:flutter/widgets.dart';
// import '../../../../../Domain/Services/Core/L10n/l10n.service.dart';
// import '../../../../../Domain/Services/Core/Routing/routing.service.dart';
// import '../../../../Astromic/astromic.dart';
// import '../../../../DS/ds.dart';
// //s2 3RD-PARTY
// //
// //s1 DEPENDENCIES
// //---------------
// //s2 SERVICES
// //s2 MODELS
// //s2 MISC
// //!SECTION - Imports
// //
// //SECTION - Exports
// //!SECTION - Exports
// //
// class SliverScaffoldComponent extends StatefulWidget {
// //SECTION - Widget Arguments
// final EdgeInsets padding;
// //
// final bool isForm;
// final bool resizeToAvoidBottomInset;
// //
// final bool implyAppbarLeading;
// //
// final String? appbarTitleString;
// final Widget Function(bool isExpanded)? appbarTitleWidget;
// //
// final List<Widget>? appbarActions;
// final Widget? appbarLeading;
// //
// final Widget? bottomNavigationBar;
// final Widget? fab;
// final FloatingActionButtonLocation? fabLocation;
// //
// final bool withSafeArea;
// final bool withScrollView;
// final bool closeKeyboardOnTap;
// final Color? forcedColor;
// final Color? forcedAppbarColor;
// final bool? isBlurred;
// //
// final Widget Function(ScrollController? controller)? body;
// final Widget? stackedImage;
// final bool withExpanded;
// final Widget? expandedWidget;
// final double? expandedHeight;
// //!SECTION
// //
// const SliverScaffoldComponent({
// Key? key,
// this.padding = const EdgeInsets.symmetric(horizontal: 20.0),
// this.isForm = false,
// this.resizeToAvoidBottomInset = true,
// this.implyAppbarLeading = true,
// this.appbarTitleString,
// this.appbarTitleWidget,
// this.appbarActions,
// this.appbarLeading,
// this.bottomNavigationBar,
// this.fab,
// this.fabLocation,
// this.withSafeArea = false,
// this.withScrollView = false,
// this.closeKeyboardOnTap = true,
// this.forcedColor,
// this.forcedAppbarColor,
// this.isBlurred = false,
// this.body,
// this.stackedImage,
// this.withExpanded = false,
// this.expandedWidget,
// this.expandedHeight,
// }) : super(
// key: key,
// );
// @override
// State<SliverScaffoldComponent> createState() => _SliverScaffoldComponentState();
// }
// class _SliverScaffoldComponentState extends State<SliverScaffoldComponent> {
// //
// //SECTION - State Variables
// //s1 --State
// late ScrollController _scrollController;
// //s1 --State
// //
// //s1 --Controllers
// //late AstromicFormController _formController;
// //s1 --Controllers
// //
// //s1 --Constants
// double collapsedBarHeight = kToolbarHeight + 8;
// //s1 --Constants
// //!SECTION
// @override
// void initState() {
// super.initState();
// //
// //SECTION - State Variables initializations & Listeners
// //s1 --State
// //s1 --State
// //
// //s1 --Controllers & Listeners
// // _formController = AstromicFormController();
// _scrollController = ScrollController();
// //s1 --Controllers & Listeners
// //
// //s1 --Late & Async Initializers
// //s1 --Late & Async Initializers
// //!SECTION
// }
// @override
// void didChangeDependencies() {
// super.didChangeDependencies();
// //
// //SECTION - State Variables initializations & Listeners
// //s1 --State
// //s1 --State
// //
// //s1 --Controllers & Listeners
// //s1 --Controllers & Listeners
// //
// //!SECTION
// }
// //SECTION - Dumb Widgets
// bool get _isSliverAppBarExpanded {
// return _scrollController.hasClients && _scrollController.offset > ((((widget.expandedHeight) ?? 250) - 20) - kToolbarHeight);
// }
// //-
// //----------------------------------------------------------------
// //-
// //!SECTION
// //SECTION - Stateless functions
// //!SECTION
// //SECTION - Action Callbacks
// //!SECTION
// @override
// Widget build(BuildContext context) {
// //SECTION - Build Setup
// //s1 --Values
// double w = MediaQuery.of(context).size.width;
// //double h = MediaQuery.of(context).size.height;
// // debugPrint(MediaQuery.of(context).viewPadding.top.toString());
// //s1 --Values
// //
// //s1 --Contexted Widgets
// //s1 --Contexted Widgets
// //!SECTION
// //SECTION - Build Return
// return AstromicWidgets.scaffold(
// withSafeArea: false,
// closeKeyboardOnTap: widget.closeKeyboardOnTap,
// padding: widget.padding,
// backgroundColor: Colors.white,
// resizeToAvoidBottomInset: widget.resizeToAvoidBottomInset,
// bottomNavigationBar: widget.bottomNavigationBar,
// floatingActionButton: widget.fab,
// floatingActionButtonLocation: widget.fabLocation,
// appBar: widget.withExpanded
// ? null
// : context.miscComponents.appbar(
// context,
// color: widget.forcedAppbarColor ?? context.colors.main.primary,
// elevation: 0,
// implyLeading: widget.implyAppbarLeading,
// leading: widget.appbarLeading,
// actions: widget.appbarActions,
// titleString: widget.appbarTitleString,
// titleWidget: widget.appbarTitleWidget != null ? widget.appbarTitleWidget!(false) : null,
// centerTitle: Platform.isIOS,
// isBlurred: widget.isBlurred ?? false,
// ),
// //
// body: widget.withExpanded
// ? NestedScrollView(
// controller: _scrollController,
// headerSliverBuilder: (context, innerBoxIsScrolled) => [
// //S1 -- Sliver Appbar
// widget.withExpanded
// ? SliverAppBar(
// collapsedHeight: collapsedBarHeight,
// expandedHeight: widget.withExpanded ? (widget.expandedHeight ?? 250) : null,
// floating: false,
// pinned: true,
// toolbarHeight: collapsedBarHeight,
// flexibleSpace: widget.withExpanded
// ? FlexibleSpaceBar(
// titlePadding: EdgeInsets.only(top: collapsedBarHeight + MediaQuery.of(context).viewPadding.top),
// collapseMode: CollapseMode.parallax,
// // stretchModes: const [StretchMode.fadeTitle],
// expandedTitleScale: 1,
// // titlePadding: EdgeInsets.only(top: collapsedBarHeight + (kToolbarHeight / 2)),
// title: widget.expandedWidget ?? Container(),
// )
// : Container(),
// backgroundColor: widget.forcedAppbarColor ?? context.colors.main.primary,
// elevation: 0,
// automaticallyImplyLeading: widget.implyAppbarLeading,
// foregroundColor: context.colors.gs.white,
// leading: widget.appbarLeading != null || widget.implyAppbarLeading
// ? Row(
// textDirection: L10nService.get(context).direction,
// children: [
// const SizedBox(
// width: 4,
// ),
// widget.appbarLeading ??
// context.buttons.neutral.icon(
// context,
// L10nService.get(context).value<IconString>(
// ar: context.assets.iconAssets.arrowRight,
// en: context.assets.iconAssets.arrowLeft,
// ),
// onTap: () async {
// RoutingService.back(context);
// },
// iconColor: context.colors.gs.white,
// ),
// ],
// )
// : null,
// leadingWidth: 48,
// actions: widget.appbarActions != null
// ? [
// Padding(
// padding: const EdgeInsets.symmetric(horizontal: 10),
// child: Row(
// children: widget.appbarActions!,
// ),
// )
// ]
// : null,
// title: widget.appbarTitleString != null
// ? Text(
// widget.appbarTitleString!,
// style: context.typography.headlines.h6.copyWith(fontSize: 18),
// )
// : widget.appbarTitleWidget!(_isSliverAppBarExpanded),
// centerTitle: Platform.isIOS,
// )
// : Container(),
// ],
// body: widget.body != null ? widget.body!(_scrollController) : Container(),
// )
// : widget.body != null
// ? widget.body!(null)
// : Container(),
// );
// //!SECTION
// }
// @override
// void dispose() {
// //SECTION - Disposable variables
// //!SECTION
// super.dispose();
// }
// }

View File

@@ -1,63 +1,20 @@
//s1 Imports
//s2 Core Package Imports
import 'dart:typed_data'; import 'dart:typed_data';
//s2 Core Packages Imports
import 'src/blur.widget.dart';
import 'src/scaffold.widget.dart';
import 'src/image.widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
//s2 1st-party Package Imports
//s2 3rd-party Package Imports
//s2 Dependancies Imports
//s3 Routes
//s3 Services
//s3 Models & Widgets
import 'src/blur.widget.dart';
import 'src/image.widget.dart';
//s1 Exports
export 'src/blur.widget.dart' show BlurExtension;
class AstromicWidgets { class AstromicWidgets {
//S1 -- SCAFFOLD /// Customized Image widget for the Astromic system.
static Widget scaffold({
//S1 -- AppBar
PreferredSizeWidget? appBar,
bool isAppbarStacked = false,
//S1 -- FAB
Widget? floatingActionButton,
FloatingActionButtonLocation? floatingActionButtonLocation,
//S1 -- Other Integral Components
Widget? drawer,
Widget? bottomNavigationBar,
Widget? bottomSheet,
//S1 -- Styling
Color? backgroundColor,
EdgeInsetsGeometry? padding,
ScrollPhysics? scrollPhysics = const BouncingScrollPhysics(),
//S1 -- Configs
bool withSafeArea = false,
bool extendBody = false,
bool resizeToAvoidBottomInset = true,
bool withScrollView = false,
bool closeKeyboardOnTap = true,
//
Widget? body,
//
}) =>
astromicScaffold(
//
appBar: appBar,
isAppbarStacked: isAppbarStacked,
//
floatingActionButton: floatingActionButton,
floatingActionButtonLocation: floatingActionButtonLocation,
//
drawer: drawer,
bottomNavigationBar: bottomNavigationBar,
bottomSheet: bottomSheet,
//
backgroundColor: backgroundColor,
padding: padding,
scrollPhysics: scrollPhysics,
//
withSafeArea: withSafeArea,
extendBody: extendBody,
resizeToAvoidBottomInset: resizeToAvoidBottomInset,
withScrollView: withScrollView,
closeKeyboardOnTap: closeKeyboardOnTap,
//
body: body,
);
//S1 -- IMAGE
static Widget image({ static Widget image({
String? assetPath, String? assetPath,
String? assetURL, String? assetURL,
@@ -121,25 +78,75 @@ class AstromicWidgets {
errorWidget: errorWidget, errorWidget: errorWidget,
); );
//S1 -- BLUR /// Customized Blur widget for the Astromic system.
static Widget blur( static Widget blur({
Widget child, required Widget child,
double sigmaX, (double x, double y)? sigma,
double sigmaY, { TileMode? tileMode,
Widget? topChild, Color? overlayColor,
Color? overlayColor = const Color.fromRGBO(0, 0, 0, 0.1), Gradient? overlayGradient,
TileMode? tileMode = TileMode.mirror,
List<BoxShadow>? shadow,
BorderRadius? radius, BorderRadius? radius,
List<BoxShadow>? shadow,
Widget? childOnTop,
}) => }) =>
astromicBlurEffect( AstromicBlur(
child, child: child,
sigmaX, sigma: sigma,
sigmaY,
topChild: topChild,
overlayColor: overlayColor,
tileMode: tileMode, tileMode: tileMode,
shadow: shadow, overlayColor: overlayColor,
overlayGradient: overlayGradient,
radius: radius, radius: radius,
shadow: shadow,
childOnTop: childOnTop,
); );
// static Widget scaffold({
// //S1 -- AppBar
// PreferredSizeWidget? appBar,
// bool isAppbarStacked = false,
// //S1 -- FAB
// Widget? floatingActionButton,
// FloatingActionButtonLocation? floatingActionButtonLocation,
// //S1 -- Other Integral Components
// Widget? drawer,
// Widget? bottomNavigationBar,
// Widget? bottomSheet,
// //S1 -- Styling
// Color? backgroundColor,
// EdgeInsetsGeometry? padding,
// ScrollPhysics? scrollPhysics = const BouncingScrollPhysics(),
// //S1 -- Configs
// bool withSafeArea = false,
// bool extendBody = false,
// bool resizeToAvoidBottomInset = true,
// bool withScrollView = false,
// bool closeKeyboardOnTap = true,
// //
// Widget? body,
// //
// }) =>
// astromicScaffold(
// //
// appBar: appBar,
// isAppbarStacked: isAppbarStacked,
// //
// floatingActionButton: floatingActionButton,
// floatingActionButtonLocation: floatingActionButtonLocation,
// //
// drawer: drawer,
// bottomNavigationBar: bottomNavigationBar,
// bottomSheet: bottomSheet,
// //
// backgroundColor: backgroundColor,
// padding: padding,
// scrollPhysics: scrollPhysics,
// //
// withSafeArea: withSafeArea,
// extendBody: extendBody,
// resizeToAvoidBottomInset: resizeToAvoidBottomInset,
// withScrollView: withScrollView,
// closeKeyboardOnTap: closeKeyboardOnTap,
// //
// body: body,
// );
} }

View File

@@ -13,16 +13,17 @@ dev_dependencies:
dependencies: dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
##S1 ~ Astromic
astromic_extensions: astromic_extensions:
git: git:
url: https://git.micazi.dev/astromic_extensions.git url: https://stag-git.micazi.dev/micazi/astromic_extensions.git
##S1 ~ 3rd-party
## Needed for the image widget.
cached_network_image: ^3.3.1 cached_network_image: ^3.3.1
flutter_svg: ^2.0.10+1 flutter_svg: ^2.0.10+1
octo_image: ^2.0.0 octo_image: ^2.0.0
## Needed for the switcher toggle.
flutter_switch: ^0.3.2 flutter_switch: ^0.3.2
## Needed for the field element.
intl: ^0.19.0 intl: ^0.19.0
flutter:
uses-material-design: true

View File

@@ -1,4 +0,0 @@
dependency_overrides:
astromic_extensions:
git:
url: https://git.prox/micazi/astromic_extensions.git