Skip to content

Commit

Permalink
Merge branch 'main' into labels
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhishikesh12 authored Jun 12, 2023
2 parents 04e368e + a66e677 commit 2818c46
Show file tree
Hide file tree
Showing 18 changed files with 709 additions and 380 deletions.
13 changes: 12 additions & 1 deletion lib/data/export.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export '../../ui_components/paginations/all_paginations/page3.dart';
export '../../ui_components/paginations/all_paginations/page4.dart';
export '../../ui_components/paginations/all_paginations/page5.dart';
export '../../ui_components/pricing_cards/All Pricing Cards/pricing_card/pricing_cards1.dart';
export '../../ui_components/segmented_controls/segmented_controls.dart';
export '../ui_components/segmented_controls/all_segmented_controls/segmented_controls.dart';
export '../../ui_components/sliders/all_sliders/dual_pointer_slider/slider4.dart';
export '../../ui_components/sliders/all_sliders/single_pointer_slider/slider1.dart';
export '../../ui_components/sliders/all_sliders/single_pointer_slider/slider2.dart';
Expand All @@ -59,3 +59,14 @@ export '../../ui_components/radios/radio_widgets/basic_radio_button.dart';
export '../../ui_components/radios/radio_widgets/radio_button_with_custom_color.dart';
export '../../ui_components/radios/radio_widgets/radio_button_with_horizontal_layout.dart';
export '../../ui_components/radios/radio_widgets/radio_button_with_text_and_styles.dart';
export '../ui_components/steppers/steppers_widgets/basic_stepper.dart';
export '../ui_components/steppers/steppers_widgets/stepper_with_custom_color.dart';
export '../ui_components/steppers/steppers_widgets/stepper_with_custom_icon.dart';
export '../ui_components/steppers/steppers_widgets/stepper_with_validation.dart';
export '../ui_components/alerts/all_alerts/dark_mode_alert/alert12.dart';
export '../ui_components/bottom_navbars/allBottomNavigationBars/animated_navbar/bottom_navbar4.dart';
export '../ui_components/bottom_navbars/allBottomNavigationBars/basic_navbars/bottom_navbar1.dart';
export '../ui_components/bottom_navbars/allBottomNavigationBars/basic_navbars/bottom_navbar2.dart';
export '../ui_components/bottom_navbars/allBottomNavigationBars/fab_navbars/bottom_navbar3.dart';
export '../ui_components/bottom_navbars/allBottomNavigationBars/fab_navbars/bottom_navbar5.dart';
export '../ui_components/bottom_navbars/allBottomNavigationBars/fab_navbars/bottom_navbar6.dart';
142 changes: 141 additions & 1 deletion lib/provider/favorite_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_component_ui/data/hive_database.dart';

import '../data/export.dart';
import '../ui_components/alerts/all_alerts/dark_mode_alert/alert12.dart';
import '../ui_components/messages/all_messages/bubble_message/message_2.dart';
import '../ui_components/messages/all_messages/bubble_message/message_3.dart';
import '../ui_components/messages/all_messages/bubble_message/message_4.dart';
Expand Down Expand Up @@ -507,6 +506,143 @@ class FavoritesProvider extends ChangeNotifier {
hightlightColor: Color(0xFF00C2CB),
),
),
70: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 8),
child: Container(
padding: const EdgeInsets.symmetric(
horizontal: 12,
vertical: 8,
),
width: double.infinity,
child: const BasicStepper(),
),
),
71: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 8),
child: Container(
padding: const EdgeInsets.symmetric(
horizontal: 12,
vertical: 8,
),
width: double.infinity,
child: const StepperwihCustomIcon(),
),
),
72: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 8),
child: Container(
padding: const EdgeInsets.symmetric(
horizontal: 12,
vertical: 8,
),
width: double.infinity,
child: const StepperwithValidation(),
),
),
73: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 8),
child: Container(
padding: const EdgeInsets.symmetric(
horizontal: 12,
vertical: 8,
),
width: double.infinity,
child: const StepperwithCustomColor(),
),
),
74: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 8),
child: Container(
padding: const EdgeInsets.symmetric(
horizontal: 12,
vertical: 8,
),
constraints: const BoxConstraints(
minWidth: 400.0,
maxWidth: 500.0,
minHeight: 50.0,
maxHeight: 100.0,
),
child: const Bottom_Navbar1(),
),
),
75: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 8),
child: Container(
padding: const EdgeInsets.symmetric(
horizontal: 12,
vertical: 8,
),
constraints: const BoxConstraints(
minWidth: 400.0,
maxWidth: 500.0,
minHeight: 50.0,
maxHeight: 100.0,
),
child: const Bottom_Navbar2(),
),
),
76: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 8),
child: Container(
padding: const EdgeInsets.symmetric(
horizontal: 12,
vertical: 8,
),
constraints: const BoxConstraints(
minWidth: 400.0,
maxWidth: 500.0,
minHeight: 50.0,
maxHeight: 100.0,
),
child: const Bottom_Navbar3(),
),
),
77: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 8),
child: Container(
padding: const EdgeInsets.symmetric(
horizontal: 12,
vertical: 8,
),
constraints: const BoxConstraints(
minWidth: 400.0,
maxWidth: 500.0,
minHeight: 50.0,
maxHeight: 100.0,
),
child: const Bottom_Navbar5(),
),
),
78: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 8),
child: Container(
padding: const EdgeInsets.symmetric(
horizontal: 12,
vertical: 8,
),
constraints: const BoxConstraints(
minWidth: 400.0,
maxWidth: 500.0,
minHeight: 50.0,
maxHeight: 100.0,
),
child: const Bottom_Navbar6(),
),
),
79: Container(
padding: const EdgeInsets.symmetric(
horizontal: 12,
vertical: 8,
),
constraints: const BoxConstraints(
minWidth: 400.0,
maxWidth: 500.0,
minHeight: 50.0,
maxHeight: 100.0,
),
child: const Bottom_Navbar4(),
),
};

final db = HiveDatabase();
Expand All @@ -527,4 +663,8 @@ class FavoritesProvider extends ChangeNotifier {
db.saveData(favs);
notifyListeners();
}

bool starred(int index) {
return favs.contains(index);
}
}
31 changes: 15 additions & 16 deletions lib/ui_components/alerts/alerts.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class _AlertScreenState extends State<AlertScreen> {
const Alert4("AMessage", "ADescriptions"),
];

List<Color?> coluredAlertsColor = [null, null, null, null];
List<int> coluredAlertsIndex = [14, 15, 16, 17];

final List<Widget> simpleAlerts = [
Expand All @@ -42,7 +41,6 @@ class _AlertScreenState extends State<AlertScreen> {
const Alert8("AMessage", "ADescriptions"),
];

List<Color?> simpleAlertsColor = [null, null, null, null];
List<int> simpleAlertsIndex = [18, 19, 20, 21];

final List<Widget> simpleAlertsDarkMode = [
Expand All @@ -52,7 +50,6 @@ class _AlertScreenState extends State<AlertScreen> {
const Alert12("AMessage", "ADescriptions"),
];

List<Color?> simpleAlertsDarkModeColor = [null, null, null, null];
List<int> simpleAlertsDarkModeIndex = [22, 23, 24, 25];

@override
Expand Down Expand Up @@ -98,13 +95,14 @@ class _AlertScreenState extends State<AlertScreen> {
onTap: () {
favProviderModel
.add(coluredAlertsIndex[index]);
setState(() {
coluredAlertsColor[index] = Colors.amber;
});
setState(() {});
},
child: Icon(
Icons.star_border_outlined,
color: coluredAlertsColor[index],
color: (favProviderModel
.starred(coluredAlertsIndex[index]))
? Colors.amber
: null,
),
),
],
Expand Down Expand Up @@ -154,13 +152,14 @@ class _AlertScreenState extends State<AlertScreen> {
onTap: () {
favProviderModel
.add(simpleAlertsIndex[index]);
setState(() {
simpleAlertsColor[index] = Colors.amber;
});
setState(() {});
},
child: Icon(
Icons.star_border_outlined,
color: simpleAlertsColor[index],
color: (favProviderModel
.starred(simpleAlertsIndex[index]))
? Colors.amber
: null,
),
),
],
Expand Down Expand Up @@ -210,14 +209,14 @@ class _AlertScreenState extends State<AlertScreen> {
onTap: () {
favProviderModel
.add(simpleAlertsIndex[index]);
setState(() {
simpleAlertsDarkModeColor[index] =
Colors.amber;
});
setState(() {});
},
child: Icon(
Icons.star_border_outlined,
color: simpleAlertsDarkModeColor[index],
color: (favProviderModel
.starred(simpleAlertsIndex[index]))
? Colors.amber
: null,
),
),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Bottom_Navbar4State extends State<Bottom_Navbar4> {
BoxShadow(
color: Colors.black.withOpacity(.1),
blurRadius: 30,
offset: Offset(0, 10),
offset: const Offset(0, 10),
),
],
borderRadius: BorderRadius.circular(50),
Expand All @@ -47,14 +47,14 @@ class Bottom_Navbar4State extends State<Bottom_Navbar4> {
child: Stack(
children: [
AnimatedContainer(
duration: Duration(seconds: 1),
duration: const Duration(seconds: 1),
curve: Curves.fastLinearToSlowEaseIn,
width: index == currentIndex
? displayWidth * .32
: displayWidth * .18,
alignment: Alignment.center,
child: AnimatedContainer(
duration: Duration(seconds: 1),
duration: const Duration(seconds: 1),
curve: Curves.fastLinearToSlowEaseIn,
height: index == currentIndex ? displayWidth * .12 : 0,
width: index == currentIndex ? displayWidth * .32 : 0,
Expand All @@ -78,19 +78,17 @@ class Bottom_Navbar4State extends State<Bottom_Navbar4> {
Row(
children: [
AnimatedContainer(
duration: Duration(seconds: 1),
duration: const Duration(seconds: 1),
curve: Curves.fastLinearToSlowEaseIn,
width:
index == currentIndex ? displayWidth * .13 : 0,
),
AnimatedOpacity(
opacity: index == currentIndex ? 1 : 0,
duration: Duration(seconds: 1),
duration: const Duration(seconds: 1),
curve: Curves.fastLinearToSlowEaseIn,
child: Text(
index == currentIndex
? '${listOfStrings[index]}'
: '',
index == currentIndex ? listOfStrings[index] : '',
style: TextStyle(
color: isDarkMode
? Colors.amberAccent
Expand All @@ -105,7 +103,7 @@ class Bottom_Navbar4State extends State<Bottom_Navbar4> {
Row(
children: [
AnimatedContainer(
duration: Duration(seconds: 1),
duration: const Duration(seconds: 1),
curve: Curves.fastLinearToSlowEaseIn,
width:
index == currentIndex ? displayWidth * .03 : 20,
Expand Down
Loading

0 comments on commit 2818c46

Please sign in to comment.