-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c12da26
commit f15837d
Showing
4 changed files
with
72 additions
and
28 deletions.
There are no files selected for viewing
53 changes: 27 additions & 26 deletions
53
lib/core/common/styles/login_Signup_widgets/form_divider.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,30 @@ | ||
// import 'package:devotion/core/constants/colors.dart'; | ||
// import 'package:flutter/material.dart'; | ||
import 'package:devotion/core/constants/colors.dart'; | ||
import 'package:devotion/core/constants/helper_functions.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
// class TFormDivider extends StatelessWidget { | ||
// TFormDivider({super.key, required this.dividerText}); | ||
class TFormDivider extends StatelessWidget { | ||
const TFormDivider({super.key, required this.dividerText}); | ||
|
||
// final String dividerText; | ||
final String dividerText; | ||
|
||
// @override | ||
// Widget build(BuildContext context) { | ||
// //final dark = THelperFunctions.isDarkMode(context); | ||
// return Row( | ||
// children: [ | ||
// Flexible(child: Divider( | ||
// color: dark ? TColors.darkGrey : TColors.grey, | ||
// thickness: 0.5, | ||
// indent:60, | ||
// endIndent: 5, | ||
// )), | ||
// Text(dividerText,style: Theme.of(context).textTheme.labelMedium,), | ||
// Flexible(child: Divider( | ||
// color: dark ? TColors.darkGrey : TColors.grey, | ||
// thickness: 0.5, | ||
// indent:60, | ||
// endIndent: 5,)), | ||
// ], | ||
// ); | ||
// } | ||
// } | ||
@override | ||
Widget build(BuildContext context) { | ||
final dark = THelperFunctions.isDarkMode(context); | ||
return Row( | ||
children: [ | ||
Flexible(child: Divider( | ||
color: dark ? TColors.darkGrey : TColors.grey, | ||
thickness: 0.5, | ||
indent:60, | ||
endIndent: 5, | ||
)), | ||
Text(dividerText,style: Theme.of(context).textTheme.labelMedium,), | ||
Flexible(child: Divider( | ||
color: dark ? TColors.darkGrey : TColors.grey, | ||
thickness: 0.5, | ||
indent:60, | ||
endIndent: 5,)), | ||
], | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class THelperFunctions { | ||
static void navigateToScreen(BuildContext context, Widget screen) { | ||
Navigator.push( | ||
context, | ||
MaterialPageRoute(builder: (_) => screen), | ||
); | ||
} | ||
|
||
static String truncateText(String text, int maxLength) { | ||
if (text.length <= maxLength) { | ||
return text; | ||
} else { | ||
return '${text.substring(0, maxLength)}...'; | ||
} | ||
} | ||
|
||
static bool isDarkMode(BuildContext context) { | ||
return Theme.of(context).brightness == Brightness.dark; | ||
} | ||
|
||
// static Size screenSize() { | ||
// return MediaQuery.of(Get.context!).size; | ||
// } | ||
|
||
|
||
// static Size screenHeight() { | ||
// return MediaQuery.of(Get.context!).size.height; | ||
// } | ||
|
||
// static Size screenWidth() { | ||
// return MediaQuery.of(Get.context!).size.width; | ||
// } | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters