Skip to content

Commit

Permalink
Updated dependencies'
Browse files Browse the repository at this point in the history
  • Loading branch information
WorkWithAfridi committed Jun 21, 2023
2 parents ec6e196 + de81b17 commit 7befe91
Show file tree
Hide file tree
Showing 12 changed files with 291 additions and 130 deletions.
54 changes: 27 additions & 27 deletions .github/workflows/cicd_workflow.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
name: CI/CD
on:
push:
branches:
- master
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
- name: Build Gradle
run: flutter build apk --release
- run: ls build/app/outputs/flutter-apk
- name: Upload artifact to Firebase App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{secrets.APP_ID}}
serviceCredentialsFileContent: ${{secrets.CREDENTIAL_FILE_CONTENT}}
release_notes: "A new version has been released."
groups: testers
file: build/app/outputs/flutter-apk/app-release.apk
# name: CI/CD
# on:
# push:
# branches:
# - master
# jobs:
# build_and_deploy:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v1
# - uses: actions/setup-java@v1
# with:
# java-version: '12.x'
# - uses: subosito/flutter-action@v1
# with:
# channel: 'stable'
# - name: Build Gradle
# run: flutter build apk --release
# - run: ls build/app/outputs/flutter-apk
# - name: Upload artifact to Firebase App Distribution
# uses: wzieba/Firebase-Distribution-Github-Action@v1
# with:
# appId: ${{secrets.APP_ID}}
# serviceCredentialsFileContent: ${{secrets.CREDENTIAL_FILE_CONTENT}}
# release_notes: "A new version has been released."
# groups: testers
# file: build/app/outputs/flutter-apk/app-release.apk
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ class _AddAndEditPinextCardViewState extends State<AddAndEditPinextCardView> {
descriptionController = TextEditingController();
balanceController = TextEditingController();
if (widget.isEditCardScreen) {
titleController.text = widget.isDemoMode ? 'Bank' : widget.pinextCardModel!.title.toString().capitalize();
titleController.text = widget.isDemoMode ? 'Bank' : widget.pinextCardModel!.title.capitalize();
descriptionController.text = widget.isDemoMode
? "The purpose of lorem ipsum is to create a natural looking block of text (sentence, paragraph, page, etc.) that doesn't distract from the layout."
: widget.pinextCardModel!.description.toString().capitalize();
: widget.pinextCardModel!.description.capitalize();
balanceController.text = widget.isDemoMode ? '55000' : widget.pinextCardModel!.balance.toString();
isEditCardColor = widget.pinextCardModel!.color;
}
Expand Down Expand Up @@ -221,7 +221,7 @@ class _AddAndEditPinextCardViewState extends State<AddAndEditPinextCardView> {
),
),
const SizedBox(
height: 8,
height: 10,
),
],
),
Expand Down Expand Up @@ -303,6 +303,7 @@ class _AddAndEditPinextCardViewState extends State<AddAndEditPinextCardView> {
),
SizedBox(
width: getWidth(context),
height: getCardHeight(context) + 10,
child: Row(
children: [
const SizedBox(
Expand All @@ -324,7 +325,7 @@ class _AddAndEditPinextCardViewState extends State<AddAndEditPinextCardView> {
cardColor: widget.isEditCardScreen ? isEditCardColor! : state.color,
title: widget.isEditCardScreen ? widget.pinextCardModel!.title : 'Example card',
balance: widget.isEditCardScreen ? widget.pinextCardModel!.balance : 1233456,
lastTransactionDate: widget.isEditCardScreen ? widget.pinextCardModel!.lastTransactionData.toString() : DateTime.now().toString(),
lastTransactionDate: widget.isEditCardScreen ? widget.pinextCardModel!.lastTransactionData : DateTime.now().toString(),
cardDetails: widget.isEditCardScreen ? widget.pinextCardModel!.description : ' ',
);
},
Expand Down Expand Up @@ -401,7 +402,7 @@ class _AddAndEditPinextCardViewState extends State<AddAndEditPinextCardView> {
}
if (state is AddCardSuccessState) {
final newPinextCard = PinextCardModel(
cardId: const Uuid().v4().toString(),
cardId: const Uuid().v4(),
title: state.title,
description: state.description,
balance: state.balance,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ class AddAndViewTransactionScreen extends StatelessWidget {

class AddAndViewTransactionView extends StatefulWidget {
AddAndViewTransactionView({
super.key,
required this.isAQuickAction,
required this.isViewOnly,
required this.pinextTransactionModel,
super.key,
});

bool isAQuickAction;
Expand Down Expand Up @@ -372,7 +372,7 @@ class _AddAndViewTransactionViewState extends State<AddAndViewTransactionView> {
(index) {
return GestureDetector(
onTap: () {
final selectedTag = transactionTags[index].toString();
final selectedTag = transactionTags[index];
if (state.selectedTag != selectedTag) {
context.read<AddTransactionsCubit>().changeSelectedTag(selectedTag);
} else {
Expand All @@ -381,7 +381,7 @@ class _AddAndViewTransactionViewState extends State<AddAndViewTransactionView> {
},
child: Chip(
label: Text(
transactionTags[index].toString(),
transactionTags[index],
style: regularTextStyle.copyWith(
color: transactionTags[index] == state.selectedTag ? whiteColor : customBlackColor.withOpacity(.6),
fontWeight: transactionTags[index] == state.selectedTag ? FontWeight.w600 : FontWeight.normal,
Expand Down Expand Up @@ -645,7 +645,7 @@ class _AddAndViewTransactionViewState extends State<AddAndViewTransactionView> {
context.read<UserBloc>().add(RefreshUserStateEvent(context: context));

final date = DateTime.parse(widget.pinextTransactionModel!.transactionDate);
final month = date.month.toString().length == 1 ? '0${date.month.toString()}' : date.month.toString();
final month = date.month.toString().length == 1 ? '0${date.month}' : date.month.toString();

if (month == currentMonth && date.year.toString() == currentYear) {
context.read<ArchiveCubit>().getCurrentMonthTransactionArchive(context);
Expand Down Expand Up @@ -844,7 +844,7 @@ class _GetCardListWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SizedBox(
height: 185,
height: getCardHeight(context) + 10,
child: SingleChildScrollView(
physics: const BouncingScrollPhysics(),
scrollDirection: Axis.horizontal,
Expand Down Expand Up @@ -910,7 +910,7 @@ class _GetCardListWidget extends StatelessWidget {

return BlocBuilder<AddTransactionsCubit, AddTransactionsState>(
builder: (context, state) {
Widget pinextCardWidget = GestureDetector(
final Widget pinextCardWidget = GestureDetector(
onTap: () {
if (!isViewOnly) {
if (state.selectedCardNo == pinextCardModel.cardId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,6 @@ class AppSettingsScreen extends StatelessWidget {
final width = MediaQuery.of(context).size.width;
final height = MediaQuery.of(context).size.height;
return Scaffold(
floatingActionButtonAnimator: FloatingActionButtonAnimator.scaling,
floatingActionButtonLocation: FloatingActionButtonLocation.endFloat,
floatingActionButton: FloatingActionButton(
onPressed: () {
context.read<HomeframeCubit>().showAboutDialog(context);
},
backgroundColor: darkPurpleColor,
child: Text(
'?',
style: boldTextStyle.copyWith(
color: whiteColor,
fontSize: 16,
),
),
),
body: SizedBox(
height: height,
width: width,
Expand Down Expand Up @@ -70,6 +55,17 @@ class AppSettingsScreen extends StatelessWidget {
const SizedBox(
height: 8,
),
GetSettingsButtonWithIcon(
onTapFunction: () {
context.read<HomeframeCubit>().showAboutDialog(context);
},
label: 'About Pinext',
icon: Icons.question_mark,
iconSize: 18,
),
const SizedBox(
height: 8,
),
GetSettingsButtonWithIcon(
onTapFunction: () {
Navigator.push(
Expand Down
4 changes: 2 additions & 2 deletions lib/app/screens/home/pages/budget_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class BudgetView extends StatelessWidget {
],
child: Scaffold(
floatingActionButtonAnimator: FloatingActionButtonAnimator.scaling,
floatingActionButtonLocation: FloatingActionButtonLocation.endFloat,
floatingActionButtonLocation: FloatingActionButtonLocation.endTop,
floatingActionButton: FloatingActionButton(
onPressed: () {
Navigator.push(
Expand Down Expand Up @@ -125,7 +125,7 @@ class BudgetView extends StatelessWidget {
),
const _GetSubscriptionWidget(),
const SizedBox(
height: kToolbarHeight * 1.5,
height: 30,
),
],
),
Expand Down
4 changes: 2 additions & 2 deletions lib/app/screens/home/pages/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class HomepageView extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
floatingActionButtonAnimator: FloatingActionButtonAnimator.scaling,
floatingActionButtonLocation: FloatingActionButtonLocation.endFloat,
floatingActionButtonLocation: FloatingActionButtonLocation.endTop,
floatingActionButton: FloatingActionButton(
onPressed: () {
context.read<HomeframeCubit>().openAddTransactionsPage(context);
Expand Down Expand Up @@ -177,7 +177,7 @@ class HomepageView extends StatelessWidget {
),
const HomepageGetYourCardsWidget(),
const SizedBox(
height: kToolbarHeight * 1.5,
height: 30,
),
],
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class HomepageGetYourCardsWidget extends StatelessWidget {
);
}
return SizedBox(
height: 185,
height: getCardHeight(context) + 10,
child: ListView.builder(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
Expand Down
2 changes: 1 addition & 1 deletion lib/app/shared/widgets/bounce_icons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class _BounceIconState extends State<BounceIcon> with SingleTickerProviderStateM
vsync: this,
duration: const Duration(milliseconds: 500),
);
_animation = Tween<double>(begin: 0.2, end: 1).animate(
_animation = Tween<double>(begin: 0.6, end: 1).animate(
CurvedAnimation(parent: _controller, curve: Curves.fastEaseInToSlowEaseOut),
);
_controller.forward();
Expand Down
22 changes: 15 additions & 7 deletions lib/app/shared/widgets/pinext_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ import 'package:timeago/timeago.dart' as timeago;

class PinextCard extends StatelessWidget {
PinextCard({
required this.cardId,
required this.cardDetails,
required this.lastTransactionDate,
super.key,
this.isSelected = false,
this.cardColor = 'Midnight Indigo',
this.title = 'Test Title',
required this.cardId,
this.balance = 0.00,
this.cardModel,
required this.cardDetails,
required this.lastTransactionDate,
});

bool isSelected;
Expand Down Expand Up @@ -68,8 +68,8 @@ class PinextCard extends StatelessWidget {
padding: const EdgeInsets.all(
15,
),
height: 210,
width: getWidth(context) * .85,
height: getCardHeight(context),
width: getCardWidth(context),
decoration: BoxDecoration(
// color: cardColor,
borderRadius: BorderRadius.circular(
Expand All @@ -88,8 +88,8 @@ class PinextCard extends StatelessWidget {
padding: const EdgeInsets.all(
15,
),
height: 210,
width: getWidth(context) * .85,
height: getCardHeight(context),
width: getCardWidth(context),
decoration: BoxDecoration(
color: Colors.black.withOpacity(.10),
borderRadius: BorderRadius.circular(
Expand Down Expand Up @@ -322,3 +322,11 @@ class PinextCard extends StatelessWidget {
);
}
}

double getCardHeight(BuildContext context) {
return (getWidth(context) * .85) / 1.7;
}

double getCardWidth(BuildContext context) {
return getWidth(context) * .85;
}
18 changes: 0 additions & 18 deletions lib/country_data/country_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -210,24 +210,6 @@ class CountryHandler {
];

void _setUpCountryList() {
// for (final country in _countryMap) {
// countryList.add(CountryData.fromMap(country));
// }

// // Sort the list based on country name
// countryList.sort((a, b) => a.name.compareTo(b.name));

// // Remove duplicates based on country name
// final uniqueCountries = <CountryData>[];
// var previousName = '';

// for (final country in countryList) {
// if (country.name != previousName) {
// uniqueCountries.add(country);
// previousName = country.name;
// }
// }
// countryList = uniqueCountries;
for (final country in _countryMap) {
countryList.add(CountryData.fromMap(country));
}
Expand Down
Loading

0 comments on commit 7befe91

Please sign in to comment.