Skip to content

Instantly share code, notes, and snippets.

@nbnD
nbnD / custom_button.dart
Created June 3, 2022 07:46
Resend Otp Timer
import 'package:flutter/material.dart';
// ignore: must_be_immutable
class CustomButton extends StatelessWidget {
final double minWidth;
final double maxWidth;
final double minHeight;
final Function onPressed;
final String title;
@nbnD
nbnD / otp_screen.dart
Created June 3, 2022 08:00
Resend otp timer
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:pin_code_fields/pin_code_fields.dart';
import 'custom_button.dart';
import 'my_theme.dart';
class OtpScreen extends StatefulWidget {
const OtpScreen({
@nbnD
nbnD / main.dart
Created June 3, 2022 08:16
Resend Otp timer
import 'package:flutter/material.dart';
import 'package:resend_otp_timer/otp_screen.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@nbnD
nbnD / alertItem.dart
Created June 6, 2022 06:20
Alert Dialog
import 'package:flutter/material.dart';
class AlertItem extends StatefulWidget {
const AlertItem({Key? key}) : super(key: key);
@override
State<AlertItem> createState() => _AlertItemState();
}
class _AlertItemState extends State<AlertItem> {
@nbnD
nbnD / homepage.dart
Created June 6, 2022 06:27
Alert Dialog
import 'package:alertdialog/alertItem.dart';
import 'package:flutter/material.dart';
class HomePage extends StatefulWidget {
const HomePage({Key? key}) : super(key: key);
@override
// ignore: library_private_types_in_public_api
_HomePageState createState() => _HomePageState();
}
@nbnD
nbnD / main.dart
Created June 6, 2022 06:46
Alert Dialog
import 'package:alertdialog/homepage.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@nbnD
nbnD / video_player.dart
Created June 14, 2022 11:20
YoutubeVideoPlayer
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:youtube_player_flutter/youtube_player_flutter.dart';
import 'package:visibility_detector/visibility_detector.dart';
class YoutubeVideo extends StatefulWidget {
String youtubeUrl;
@nbnD
nbnD / homepage.dart
Created June 14, 2022 11:23
YoutubeVideo Player
import 'package:flutter/material.dart';
import 'video_player.dart';
class HomePage extends StatefulWidget {
const HomePage({Key? key}) : super(key: key);
@override
State<HomePage> createState() => _HomePageState();
}
@nbnD
nbnD / main.dart
Created June 14, 2022 11:25
YoutubeVideoPlayer
import 'package:flutter/material.dart';
import 'homepage.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@nbnD
nbnD / authservice.dart
Created June 22, 2022 11:31
Biometic login
import 'dart:developer';
import 'package:local_auth/local_auth.dart';
class AuthService {
static Future<bool> authenticateUser() async {
//for status of authentication
bool isAuthenticated = false;