| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- // lib/app/widgets/divider_with_text.dart
- import 'package:flutter/material.dart';
- import 'package:get/get.dart';
- import 'package:nomo/config/theme/theme_extensions/theme_extension.dart';
- class DividerWithText extends StatelessWidget {
- final String text;
- final double height;
- final Color? dividerColor;
- final Color? textColor;
- final double dividerThickness;
- final EdgeInsets padding;
- const DividerWithText({
- super.key,
- this.text = 'Or',
- this.height = 16.0,
- this.dividerColor,
- this.textColor,
- this.dividerThickness = 1.0,
- this.padding = const EdgeInsets.symmetric(horizontal: 24.0),
- });
- @override
- Widget build(BuildContext context) {
- return Padding(
- padding: padding,
- child: Row(
- children: [
- Expanded(
- child: Divider(
- height: height,
- thickness: dividerThickness,
- color: dividerColor ?? Get.reactiveTheme.dividerColor,
- ),
- ),
- Padding(
- padding: const EdgeInsets.symmetric(horizontal: 16.0),
- child: Text(
- text,
- style: TextStyle(
- color:
- textColor ?? Get.reactiveTheme.textTheme.bodyLarge!.color,
- fontSize: 14,
- ),
- ),
- ),
- Expanded(
- child: Divider(
- height: height,
- thickness: dividerThickness,
- color: dividerColor ?? Colors.grey[400],
- ),
- ),
- ],
- ),
- );
- }
- }
|