Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 / 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;