Skip to content

Instantly share code, notes, and snippets.

class SignIn extends StatefulWidget {
@override
_SignInState createState() => _SignInState();
}
class _SignInState extends State<SignIn> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
import 'package:shared_preferences/shared_preferences.dart';
class SharedPreferencesHelper {
static String userIdKey = "USERKEY";
static String userNameKey = "USERNAMEKEY";
static String displayNameKey = "USERDISPLAYNAMEKEY";
static String userEmailKey = "USEREMAILKEY";
static String userProfilePicKey = "USERPROFILEPICKEY";
//SAVE data
class AuthMethods {
final FirebaseAuth auth = FirebaseAuth.instance;
getCurrentUser() async {
return await auth.currentUser;
}
signInWithGoogle(BuildContext context) async {
final FirebaseAuth _firebaseAuth = FirebaseAuth.instance;
final GoogleSignIn _googleSignIn = GoogleSignIn();
firebase_auth:
firebase_core:
google_sign_in:
shared_preferences:
random_string:
cloud_firestore:
import 'package:flutter/material.dart';
import 'package:liquid_swipe/liquid_swipe.dart';
class MyAnimationApp extends StatefulWidget {
@override
_MyAnimationAppState createState() => _MyAnimationAppState();
}
class _MyAnimationAppState extends State<MyAnimationApp>
with SingleTickerProviderStateMixin {
import 'package:animation_app/animation.dart';
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(
title: Text(
class VideoPlayerScreen extends StatefulWidget {
VideoPlayerScreen({Key key}) : super(key: key);
@override
_VideoPlayerScreenState createState() => _VideoPlayerScreenState();
}
class _VideoPlayerScreenState extends State<VideoPlayerScreen> {
VideoPlayerController _controller;
Future<void> _initializeVideoPlayerFuture;
class Myaudio extends StatefulWidget {
_MyaudioState createState() => _MyaudioState();
SongInfo songInfo;
Function changeTrack;
final GlobalKey<_MyaudioState> key;
Myaudio({this.songInfo,this.changeTrack,this.key}):super(key:key);
}
class _MyaudioState extends State<Myaudio> {
double minimumValue = 0.0, maximumValue = 0.0, currentValue = 0.0;
Slider(
inactiveColor: Colors.black,
activeColor: Colors.redAccent,
min: minimumValue,max: maximumValue,value: currentValue,
onChanged: (value) {
currentValue=value;
player.seek(Duration(milliseconds: currentValue.round()));
},
),
Container(transform: Matrix4.translationValues(0, -15, 0),margin: EdgeInsets.fromLTRB(10, 0, 10, 0),child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween,children: [
class Tracks extends StatefulWidget {
_TracksState createState() => _TracksState();
}
class _TracksState extends State<Tracks> {
final FlutterAudioQuery audioQuery = FlutterAudioQuery();
List<SongInfo> songs = [];
int currentIndex = 0;
//final GlobalKey<_MyaudioState>key=GlobalKey<_MyaudioState>();
void initState() {