Skip to content

Instantly share code, notes, and snippets.

View Hiteshpatel10's full-sized avatar

Hitesh Patel Hiteshpatel10

View GitHub Profile
@Hiteshpatel10
Hiteshpatel10 / DropdownList
Last active November 28, 2021 15:59
This is how you can make a dropdown list in compose
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.material.*
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowDropDown
import androidx.compose.material.icons.filled.ArrowDropUp
import androidx.compose.runtime.*
@Hiteshpatel10
Hiteshpatel10 / onboard_one.dart
Created February 27, 2024 16:47
Flutter code for a basic onboarding UI with illustrations, titles, and subtitles. It includes a PageView for navigation, an AnimatedPageIndicator to track progress, and an ElevatedButton for interaction. Data for each onboarding page is stored in onboardingData
import 'package:flutter/material.dart';
class OnboardingOneView extends StatefulWidget {
const OnboardingOneView({super.key});
@override
State<OnboardingOneView> createState() => _OnboardingOneViewState();
}
class _OnboardingOneViewState extends State<OnboardingOneView> {
@Hiteshpatel10
Hiteshpatel10 / snackbar_one.dart
Last active April 30, 2024 18:01
This Flutter component provides a customizable snackbar widget for displaying messages with different types such as success, error, warning, or information. It allows developers to easily show informative messages to users with configurable colors, icons, and durations. The snackbar is designed with a floating behavior, rounded corners, and supp…
import 'package:flutter/material.dart';
enum SnackbarOneType {
success,
error,
warning,
information,
}
snackbarOne({
@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;
@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 / 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 / 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 / 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_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 / 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;