salvadordeveloper / flutter-tiktok Goto Github PK
View Code? Open in Web Editor NEWA TikTok Clone in Flutter and Firebase.
License: MIT License
A TikTok Clone in Flutter and Firebase.
License: MIT License
Hi @salvadordeveloper bro, please help me to solve this issue. I am getting error in these below codes
var userData = await Firestore.instance.collection("Users").where("username",isEqualTo: userId).getDocuments();
var videosViewed = userData.documents[0].data['videosViewed'];
are you using any user table? please help me to solve my issue. I am waiting for your reply,
Hey man I believe your project is quite amazing, I have been having fun with it for the past few days.
One issue I cannot fix at all, I am getting out of memory exception when scrolling through many videos, I have been trying to find a way to dispose the video controller without success
I see that you have tried also, did you manage to solve that issue somehow ?
Thanks !
in theory, based on this, can you create an account registrar with the ability to interact with live users?
So when navigating to another page video is still playing.
E/flutter (17787): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: RangeError (index): Invalid value: Valid value range is empty: 0
E/flutter (17787): #0 List.[] (dart:core-patch/growable_array.dart:177:60)
E/flutter (17787): #1 FeedViewModel.loadVideo (package:tiktok_flutter/screens/feed_viewmodel.dart:35:33)
E/flutter (17787): #2 _FeedScreenState.initState (package:tiktok_flutter/screens/feed_screen.dart:28:19)
E/flutter (17787): #3 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4765:58)
E/flutter (17787): #4 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4601:5)
E/flutter (17787): #5 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14)
E/flutter (17787): #6 Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18)
E/flutter (17787): #7 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6118:14)
E/flutter (17787): #8 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14)
E/flutter (17787): #9 Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18)
E/flutter (17787): #10 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
E/flutter (17787): #11 Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
E/flutter (17787): #12 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4606:5)
E/flutter (17787): #13 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4601:5)
E/flutter (17787): #14 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14)
E/flutter (17787): #15 Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18)
E/flutter (17787): #16 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6118:14)
E/flutter (17787): #17 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14)
E/flutter (17787): #18 Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18)
E/flutter (17787): #19 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6118:14)
E/flutter (17787): #20 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14)
E/flutter (17787): #21 Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18)
E/flutter (17787): #22 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
E/flutter (17787): #23 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
E/flutter (17787): #24 Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
E/flutter (17787): #25 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4606:5)
E/flutter (17787): #26 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4791:11)
E/flutter (17787): #27 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4601:5)
E/flutter (17787): #28 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14)
E/flutter (17787): #29 Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18)
E/flutter (17787): #30 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6118:14)
E/flutter (17787): #31 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14)
E/flutter (17787): #32 Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18)
E/flutter (17787): #33 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6118:14)
E/flutter (17787): #34 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14)
E/flutter (17787): #35 Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18)
E/flutter (17787): #36 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
E/flutter (17787): #37 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
E/flutter (17787): #38 Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
E/flutter (17787): #39 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4606:5)
E/flutter (17787): #40 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4791:11)
E/flutter (17787): #41 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4601:5)
E/flutter (17787): #42 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3569:14)
E/flutter (17787): #43 Element.updateChild (package:flutter/src/widgets/framework.dart:3327:18)
E/flutter (17787): #44 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4652:16)
E/flutter (17787): #45 Element.rebuild (package:flutter/src/widgets/framework.dart:
I noticed that sometimes when running the app, the first video froze after a few frames and the audio from the 2nd video started playing. After analyzing, it seems to be due to a race condition on initState of _FeedScreenState:
void initState() {
feedViewModel.loadVideo(0);
feedViewModel.loadVideo(1);
super.initState();
}
void loadVideo(int index) async {
if (videoSource!.listVideos.length > index) {
await videoSource!.listVideos[index].loadController();
videoSource!.listVideos[index].controller?.play();
notifyListeners();
}
}
Both videos are loaded asynchronously, and after loading the video starts to get played. If the 1st video gets loaded before the 2nd, then when the 2nd finishes loading we call controller.play() which starts playing the audio from the 2nd video.
Can you add so it get data/videos from reddit api?
I running it in Android Studio and i am getting this messages as well:
error: The getter 'person_add_alt_1_outlined' isn't defined for the type 'Icons'. (undefined_getter at [tiktok_flutter] lib/screens/profile_screen.dart:21)
error: The getter 'qr_code' isn't defined for the type 'Icons'. (undefined_getter at [tiktok_flutter] lib/screens/search_screen.dart:43)
Any idea how to resolve this?
Can I have google-services.json file of this project?
Add it to F-Droid please.
@salvadordeveloper Hello, I am really liking this whole idea. Could you perhaps make a youtube tutorial on this. Also I want to know where do I add the google-services.json and what rules do I need to change in the firebase?
I have followed the instructions in the readme and added my firebase file and when i try to start the app in iOS i get this:
Resolving dependencies of Podfile
[!] CDN: trunk URL couldn't be downloaded: https://cdn.cocoapods.org/CocoaPods-version.yml Response: 500
Fastly error: unknown domain: cdn.cocoapods.org. Please check that this domain has been added to a service.
Details: cache-fra19171-FRA
Any idea?
Hi,
Just to tell you that your google credentials are available within the repository. Hope your credit card is not liked to it ๐
Regards,
Guillaume
Do you have any plans on making the web version of the app?
Hi,
I have created my firebase instance and generated google-services.json file and added in android/app path but database/tables are not created when i run this project so please tell me where i am wrong? i want to add any connections in project files? I am new to flutter so please guide me. I am getting an error in videos_api.dart page as "Exception has occurred. RangeError (RangeError (index): Invalid value: Valid value range is empty: 0)" please guide me.
Hi,
First of all you have done a great job to creating this as i have found many TikTok UI clone but they are just using background image.
You have created a complete project.
I am struggling to use this with my local database which is MySql.
Also i didn't found much documentation for this. Youtube video was also smaller.
Can you put some documentations or help to implement it with other database instead of Firebase.
Many errors
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.