Added comments
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import 'package:cabo_counter/core/custom_theme.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
/// A customizable button widget using Cupertino style.
|
||||
///
|
||||
/// Displays a button with a child widget and optional callback.
|
||||
/// The button uses a medium size, rounded corners, and a custom background color.
|
||||
class CustomButton extends StatelessWidget {
|
||||
final Widget child;
|
||||
final VoidCallback? onPressed;
|
||||
|
||||
@@ -2,6 +2,11 @@ import 'package:cabo_counter/core/custom_theme.dart';
|
||||
import 'package:cabo_counter/presentation/widgets/custom_stepper.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
/// A customizable form row widget with a prefix icon, text, and optional suffix widget.
|
||||
///
|
||||
/// Displays a row with an icon and text on the left side.
|
||||
/// Optionally, a suffix widget (e.g. a stepper) can be shown on the right side.
|
||||
/// The row is styled as a [CupertinoButton] and can react to taps.
|
||||
class CustomFormRow extends StatefulWidget {
|
||||
final String prefixText;
|
||||
final IconData prefixIcon;
|
||||
|
||||
@@ -1,6 +1,17 @@
|
||||
import 'package:cabo_counter/core/custom_theme.dart';
|
||||
import 'package:flutter/cupertino.dart'; // Für iOS-Style
|
||||
|
||||
/// A custom stepper widget for incrementing and decrementing a value.
|
||||
///
|
||||
/// The [CustomStepper] widget allows increasing and decreasing a value
|
||||
/// within a defined range ([minValue] to [maxValue]) in fixed steps.
|
||||
///
|
||||
/// Properties:
|
||||
/// - [minValue]: The minimum value.
|
||||
/// - [maxValue]: The maximum value.
|
||||
/// - [initialValue]: The initial value (optional, defaults to [minValue]).
|
||||
/// - [step]: The step size.
|
||||
/// - [onChanged]: Callback triggered when the value changes.
|
||||
class CustomStepper extends StatefulWidget {
|
||||
final int minValue;
|
||||
final int maxValue;
|
||||
|
||||
Reference in New Issue
Block a user