Skip to content

Instantly share code, notes, and snippets.

View Shubham-Narkhede's full-sized avatar
🎯
Focusing

Shubham-Narkhede Shubham-Narkhede

🎯
Focusing
View GitHub Profile
MaterialButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(40),
),
color: Colors.white,
child: Text('Simple Pop Up'),
onPressed: () async {
await animated_dialog_box.showCustomAlertBox(
// You can change the animation which u=you want to use like
static Widget buildLoginBtn(var buttonTitle, Function function) {
return Container(
// height: 90,
padding: EdgeInsets.only(right: 40,left: 40,bottom: 15),
width: double.infinity,
child: RaisedButton(
elevation: 5.0,
onPressed: () {
function();
},
Widget _buildSocialBtn(Function onTap, AssetImage logo) {
return GestureDetector(
onTap: onTap,
child: Container(
height: 60.0,
width: 60.0,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.white,
static Widget buildSignupSigninBtn(var quetion, var pageName, Function function) {
return Padding(padding: EdgeInsets.only(bottom: 0,top: 5),child: GestureDetector(
onTap: () {
function();
},
child: RichText(
text: TextSpan(
children: [
TextSpan(
text: quetion,
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return StreamBuilder(
stream: Connectivity().onConnectivityChanged,
builder: (context, AsyncSnapshot<ConnectivityResult> snapshot) {
return snapshot.data == ConnectivityResult.mobile ||
@Shubham-Narkhede
Shubham-Narkhede / camera.dart
Last active December 5, 2025 10:31
Camera for web
import 'package:flutter/material.dart';
class RankProgressBar extends StatelessWidget {
final double progress; // From 0.0 → 1.0
final int currentRank; // e.g., 7
final List<int> milestones; // e.g., [7, 6, 5, 4, 3, 2, 1]
const RankProgressBar({
super.key,
required this.progress,