Skip to content

Instantly share code, notes, and snippets.

View Hiteshpatel10's full-sized avatar

Hitesh Patel Hiteshpatel10

View GitHub Profile
@Hiteshpatel10
Hiteshpatel10 / counting_text.dart
Last active March 6, 2024 07:50
The CountingText widget in Flutter displays an animated text that counts from a specified beginning value to an end value. It utilizes an animation controller with a customizable curve and duration to animate the counting effect. Text style and other text properties can also be customized.
class CountingText extends StatefulWidget {
const CountingText({
Key? key,
required this.begin,
required this.end,
this.precision = 0,
this.curve = Curves.decelerate,
this.duration = const Duration(milliseconds: 400),
this.style,
this.textAlign,
@Hiteshpatel10
Hiteshpatel10 / marquee_one.dart
Created February 27, 2024 17:16
The Marquee widget in Flutter provides a scrolling display for a list of widgets, allowing continuous horizontal movement. It supports both predefined children and dynamic content generation using a builder pattern.
class Marquee extends StatefulWidget {
const Marquee({
Key? key,
required this.children,
this.offset = 40.0,
this.maxHeight = 40.0,
}) : itemBuilder = null,
itemCount = children.length,
super(key: key);
@Hiteshpatel10
Hiteshpatel10 / date_select_one.dart
Created February 27, 2024 17:14
The cupertinoCalenderDrawer function in Flutter displays a modal bottom sheet containing a Cupertino-style date picker. Users can select a date within a specified range, and the selected date is passed back via a callback function.
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
// final dateFormat = DateFormat('dd-MM-yyyy');
typedef DateSelectionCallback = void Function(DateTime selectedDate);
Future<void> cupertinoCalenderDrawer({
required BuildContext context,
required DateTime? initialDate,
required DateSelectionCallback onSave,
@Hiteshpatel10
Hiteshpatel10 / vertical_tab_bar_one.dart
Created February 27, 2024 17:12
VerticalTabs is a Flutter widget providing vertical tab navigation. It features customizable tab width, indicator appearance, and content scroll axis. Tabs can be controlled programmatically, and it supports both icon and text content for tabs.
import 'package:flutter/material.dart';
enum IndicatorSide { start, end }
PageController controller = PageController(viewportFraction: 1, keepPage: true);
class VerticalTabs extends StatefulWidget {
final int initialIndex;
final double tabsWidth;
final double indicatorWidth;
@Hiteshpatel10
Hiteshpatel10 / tab_bar_three.dart
Created February 27, 2024 17:11
TabBarOne is a stateless widget in Flutter that displays a customizable tab bar. It supports features like scrollability, indicator color, and label colors. The tabs can be controlled by a TabController and can contain dynamic text content.
import 'package:flutter/material.dart';
class TabBarThree extends StatelessWidget {
final List<String> tabs;
final bool isScrollable;
final double height;
final TabController? tabController;
final double borderRadius;
const TabBarThree({
@Hiteshpatel10
Hiteshpatel10 / tab_bar_two.dart
Created February 27, 2024 17:10
TabBarOne is a stateless widget in Flutter that displays a customizable tab bar. It supports features like scrollability, indicator color, and label colors. The tabs can be controlled by a TabController and can contain dynamic text content.
import 'package:flutter/material.dart';
class TabBarTwo extends StatelessWidget {
final List<String> tabs;
final bool isScrollable;
final double height;
final TabController? tabController;
final double borderRadius;
const TabBarTwo({
@Hiteshpatel10
Hiteshpatel10 / tab_bar_one.dart
Created February 27, 2024 17:08
TabBarOne is a stateless widget in Flutter that displays a customizable tab bar. It supports features like scrollability, indicator color, and label colors. The tabs can be controlled by a TabController and can contain dynamic text content.
import 'package:flutter/material.dart';
class TabBarOne extends StatelessWidget {
const TabBarOne({
super.key,
required this.tabs,
this.isScrollable = true,
this.controller,
});
@Hiteshpatel10
Hiteshpatel10 / social_login_two.dart
Last active March 6, 2024 07:53
The SocialLoginTwoView widget in Flutter displays a screen with circular elevated buttons for various social login options, including Google, Facebook, GitHub, WhatsApp, and LinkedIn. Each button features the respective platform's logo
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
// Outh Icons
// http://tinyurl.com/social-login-one-assets
class SocialLoginTwoView extends StatelessWidget {
const SocialLoginTwoView({super.key});
@override
@Hiteshpatel10
Hiteshpatel10 / social_login_one.dart
Created February 27, 2024 17:03
The SocialLoginOneView Dart class represents a stateless widget for displaying a screen with multiple social login options. It includes buttons for Google, Facebook, GitHub, WhatsApp, and LinkedIn, each accompanied by their respective logos
// Oauth svg
// http://tinyurl.com/social-login-one-assets
class SocialLoginOneView extends StatelessWidget {
const SocialLoginOneView({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: Padding(
@Hiteshpatel10
Hiteshpatel10 / blue_container_one.dart
Created February 27, 2024 16:54
# BlurContainer Widget A reusable Flutter widget that wraps its child with a blurred container. It provides customizable properties such as blur level, elevation, padding, color, and border radius, allowing for flexible usage in creating visually appealing UI elements. ### Features: - Applies a blur effect to its child within a container. - Adju…
import 'dart:ui';
import 'package:flutter/material.dart';
class BlurContainer extends StatelessWidget {
final Widget child;
final double? height;
final double? width;
final double elevation;
final double blur;