feat : action
add supervisons
This commit is contained in:
@@ -8,5 +8,6 @@ export 'package:rasadyar_core/presentation/widget/widget.dart';
|
||||
//other packages
|
||||
export 'package:flutter_slidable/flutter_slidable.dart';
|
||||
export 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
export 'package:flutter_rating_bar/flutter_rating_bar.dart';
|
||||
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ class AppColor {
|
||||
static const Color blackDarker = Color(0xFF000000); // #000000 rgb(0, 0, 0)
|
||||
//endregion
|
||||
|
||||
//region ---Dark Grey Colors ---
|
||||
//region --- Grey Colors ---
|
||||
static const Color darkGreyLight = Color(
|
||||
0xFFeaeaea,
|
||||
); // #eaeaea rgb(234, 234, 234)
|
||||
@@ -357,6 +357,11 @@ class AppColor {
|
||||
0xFF0a4953,
|
||||
); // #0a4953 rgb(10, 73, 83)
|
||||
static const Color tealDarker = Color(0xFF083940); // #083940 rgb(8, 57, 64)
|
||||
|
||||
|
||||
|
||||
static const Color bgLight = Color(0xFFF5F5F5); // #083940 rgb(8, 57, 64)
|
||||
static const Color bgDark = Color(0xFF979797); // #083940 rgb(8, 57, 64)
|
||||
//endregion
|
||||
|
||||
//region --- category Colors ---
|
||||
|
||||
@@ -5,16 +5,21 @@ class Assets {
|
||||
static const String iconsAdd = 'assets/icons/add.svg';
|
||||
static const String iconsArrowLeft = 'assets/icons/arrow_left.svg';
|
||||
static const String iconsArrowRight = 'assets/icons/arrow_right.svg';
|
||||
static const String iconsCalendar = 'assets/icons/calendar.svg';
|
||||
static const String iconsCalendarSearch = 'assets/icons/calendar_search.svg';
|
||||
static const String iconsCall = 'assets/icons/call.svg';
|
||||
static const String iconsDiagram = 'assets/icons/diagram.svg';
|
||||
static const String iconsDownload = 'assets/icons/download.svg';
|
||||
static const String iconsEdit = 'assets/icons/edit.svg';
|
||||
static const String iconsFilter = 'assets/icons/filter.svg';
|
||||
static const String iconsGps = 'assets/icons/gps.svg';
|
||||
static const String iconsKey = 'assets/icons/key.svg';
|
||||
static const String iconsLogout = 'assets/icons/logout.svg';
|
||||
static const String iconsMap = 'assets/icons/map.svg';
|
||||
static const String iconsMapMarker = 'assets/icons/map_marker.svg';
|
||||
static const String iconsMessageAdd = 'assets/icons/message_add.svg';
|
||||
static const String iconsProfileCircle = 'assets/icons/profile_circle.svg';
|
||||
static const String iconsProfileUser = 'assets/icons/profile_user.svg';
|
||||
static const String iconsScan = 'assets/icons/scan.svg';
|
||||
static const String iconsScanBarcode = 'assets/icons/scan_barcode.svg';
|
||||
static const String iconsSecurityTime = 'assets/icons/security_time.svg';
|
||||
@@ -25,16 +30,21 @@ class Assets {
|
||||
static const String vecAddSvg = 'assets/vec/add.svg.vec';
|
||||
static const String vecArrowLeftSvg = 'assets/vec/arrow_left.svg.vec';
|
||||
static const String vecArrowRightSvg = 'assets/vec/arrow_right.svg.vec';
|
||||
static const String vecCalendarSearchSvg = 'assets/vec/calendar_search.svg.vec';
|
||||
static const String vecCalendarSvg = 'assets/vec/calendar.svg.vec';
|
||||
static const String vecCallSvg = 'assets/vec/call.svg.vec';
|
||||
static const String vecDiagramSvg = 'assets/vec/diagram.svg.vec';
|
||||
static const String vecDownloadSvg = 'assets/vec/download.svg.vec';
|
||||
static const String vecEditSvg = 'assets/vec/edit.svg.vec';
|
||||
static const String vecFilterSvg = 'assets/vec/filter.svg.vec';
|
||||
static const String vecGpsSvg = 'assets/vec/gps.svg.vec';
|
||||
static const String vecKeySvg = 'assets/vec/key.svg.vec';
|
||||
static const String vecLogoutSvg = 'assets/vec/logout.svg.vec';
|
||||
static const String vecMapMarkerSvg = 'assets/vec/map_marker.svg.vec';
|
||||
static const String vecMapSvg = 'assets/vec/map.svg.vec';
|
||||
static const String vecMessageAddSvg = 'assets/vec/message_add.svg.vec';
|
||||
static const String vecProfileCircleSvg = 'assets/vec/profile_circle.svg.vec';
|
||||
static const String vecProfileUserSvg = 'assets/vec/profile_user.svg.vec';
|
||||
static const String vecScanBarcodeSvg = 'assets/vec/scan_barcode.svg.vec';
|
||||
static const String vecScanSvg = 'assets/vec/scan.svg.vec';
|
||||
static const String vecSecurityTimeSvg = 'assets/vec/security_time.svg.vec';
|
||||
|
||||
@@ -42,6 +42,7 @@ class RAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
child: leading,
|
||||
),
|
||||
actions: [
|
||||
if (additionalActions != null) ...additionalActions!,
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
child: IconButton(
|
||||
@@ -50,7 +51,7 @@ class RAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
color: iconColor,
|
||||
),
|
||||
),
|
||||
if (additionalActions != null) ...additionalActions!,
|
||||
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2,25 +2,27 @@ import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_core/presentation/common/app_color.dart';
|
||||
import 'package:rasadyar_core/presentation/common/app_fonts.dart';
|
||||
|
||||
class RElevated extends StatefulWidget {
|
||||
class RElevated extends StatelessWidget {
|
||||
RElevated({
|
||||
super.key,
|
||||
required this.text,
|
||||
required this.onPressed,
|
||||
foregroundColor,
|
||||
backgroundColor,
|
||||
disabledBackgroundColor,
|
||||
disabledForegroundColor,
|
||||
radius,
|
||||
textStyle,
|
||||
this.foregroundColor,
|
||||
this.backgroundColor,
|
||||
this.disabledBackgroundColor,
|
||||
this.disabledForegroundColor,
|
||||
this.radius,
|
||||
this.textStyle,
|
||||
this.width = 150.0,
|
||||
this.height = 56.0,
|
||||
this.isFullWidth,
|
||||
});
|
||||
|
||||
final String text;
|
||||
final VoidCallback? onPressed;
|
||||
final double width;
|
||||
final double height;
|
||||
final bool? isFullWidth;
|
||||
Color? foregroundColor;
|
||||
Color? backgroundColor;
|
||||
Color? disabledForegroundColor;
|
||||
@@ -28,29 +30,24 @@ class RElevated extends StatefulWidget {
|
||||
double? radius;
|
||||
TextStyle? textStyle;
|
||||
|
||||
@override
|
||||
State<RElevated> createState() => _RElevatedState();
|
||||
}
|
||||
|
||||
class _RElevatedState extends State<RElevated> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ElevatedButton(
|
||||
onPressed: widget.onPressed,
|
||||
onPressed: onPressed,
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: widget.backgroundColor ?? AppColor.blueNormal,
|
||||
foregroundColor: widget.foregroundColor ?? Colors.white,
|
||||
backgroundColor: backgroundColor ?? AppColor.blueNormal,
|
||||
foregroundColor: foregroundColor ?? Colors.white,
|
||||
disabledBackgroundColor:
|
||||
widget.disabledBackgroundColor ?? AppColor.blueNormal.withAlpha(38),
|
||||
disabledForegroundColor: widget.disabledForegroundColor ?? Colors.white,
|
||||
disabledBackgroundColor ?? AppColor.blueNormal.withAlpha(38),
|
||||
disabledForegroundColor: disabledForegroundColor ?? Colors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(widget.radius ?? 8),
|
||||
borderRadius: BorderRadius.circular(radius ?? 8),
|
||||
),
|
||||
fixedSize: Size(widget.width, widget.height),
|
||||
minimumSize: Size((isFullWidth ??false) ? double.infinity : width, height),
|
||||
padding: EdgeInsets.zero,
|
||||
textStyle: widget.textStyle ?? AppFonts.yekan24,
|
||||
textStyle: textStyle ?? AppFonts.yekan24,
|
||||
),
|
||||
child: Text(widget.text),
|
||||
child: Text(text),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
@immutable
|
||||
class RTextField extends StatefulWidget {
|
||||
@@ -27,6 +28,7 @@ class RTextField extends StatefulWidget {
|
||||
this.minLines,
|
||||
this.radius,
|
||||
this.filled,
|
||||
this.filledColor,
|
||||
this.enabled,
|
||||
this.errorStyle,
|
||||
this.labelStyle,
|
||||
@@ -61,6 +63,7 @@ class RTextField extends StatefulWidget {
|
||||
this.readonly = false,
|
||||
this.label,
|
||||
this.filled,
|
||||
this.filledColor,
|
||||
this.errorStyle,
|
||||
this.labelStyle,
|
||||
this.enabled}) {
|
||||
@@ -95,6 +98,7 @@ class RTextField extends StatefulWidget {
|
||||
this.readonly = false,
|
||||
this.label,
|
||||
this.filled,
|
||||
this.filledColor,
|
||||
this.errorStyle,
|
||||
this.labelStyle,
|
||||
this.enabled}) {
|
||||
@@ -132,6 +136,7 @@ class RTextField extends StatefulWidget {
|
||||
Widget? suffixIcon;
|
||||
Widget? prefixIcon;
|
||||
bool? filled;
|
||||
Color? filledColor;
|
||||
bool _isPassword = false;
|
||||
|
||||
final BoxConstraints? boxConstraints;
|
||||
@@ -204,8 +209,9 @@ class _RTextFieldState extends State<RTextField> {
|
||||
prefixIconConstraints: widget.boxConstraints,
|
||||
hintText: widget.hintText,
|
||||
labelText: widget.label,
|
||||
labelStyle: widget.labelStyle,
|
||||
labelStyle: widget.labelStyle??AppFonts.yekan14.copyWith(color: AppColor.lightGreyDarkActive),
|
||||
filled: widget.filled,
|
||||
fillColor: widget.filledColor,
|
||||
counter: widget.showCounter ? null : const SizedBox(),
|
||||
hintStyle: widget.hintStyle,
|
||||
enabledBorder: widget._inputBorder,
|
||||
|
||||
@@ -230,6 +230,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.0.0"
|
||||
flutter_rating_bar:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_rating_bar
|
||||
sha256: d2af03469eac832c591a1eba47c91ecc871fe5708e69967073c043b2d775ed93
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.0.1"
|
||||
flutter_slidable:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
||||
@@ -13,6 +13,7 @@ dependencies:
|
||||
#UI
|
||||
cupertino_icons: ^1.0.8
|
||||
flutter_slidable: ^4.0.0
|
||||
flutter_rating_bar: ^4.0.1
|
||||
|
||||
##Log
|
||||
logger: ^2.5.0
|
||||
@@ -42,6 +43,8 @@ dependencies:
|
||||
|
||||
permission_handler: ^11.4.0
|
||||
|
||||
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
|
||||
Reference in New Issue
Block a user