This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static Future<sql.Database> db() async { | |
return sql.openDatabase( | |
'nabindhakal.db', | |
version: 1, | |
onCreate: (sql.Database database, int version) async { | |
await createTables(database); | |
}, | |
); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static Future<void> createTables(sql.Database database) async { | |
await database.execute("""CREATE TABLE items( | |
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, | |
title TEXT, | |
description TEXT, | |
createdAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP | |
) | |
"""); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'login.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({Key? key}) : super(key: key); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "package:flutter/material.dart"; | |
class SuccessScreen extends StatefulWidget { | |
const SuccessScreen({Key? key}) : super(key: key); | |
@override | |
State<SuccessScreen> createState() => _SuccessScreenState(); | |
} | |
class _SuccessScreenState extends State<SuccessScreen> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:biometric_login/success_screen.dart'; | |
import 'package:flutter/material.dart'; | |
import 'authservice.dart'; | |
class LoginPage extends StatefulWidget { | |
const LoginPage({Key? key, required this.title}) : super(key: key); | |
final String title; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:developer'; | |
import 'package:local_auth/local_auth.dart'; | |
class AuthService { | |
static Future<bool> authenticateUser() async { | |
//for status of authentication | |
bool isAuthenticated = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'homepage.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({Key? key}) : super(key: key); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |