rivaanranawat / flutter_twitter_clone Goto Github PK
View Code? Open in Web Editor NEWFull Stack Twitter Clone developed using Flutter, Appwrite, Riverpod. 9 Hour Tutorial link below👇
Home Page: https://www.youtube.com/watch?v=XnxZLhtkFeg
Full Stack Twitter Clone developed using Flutter, Appwrite, Riverpod. 9 Hour Tutorial link below👇
Home Page: https://www.youtube.com/watch?v=XnxZLhtkFeg
Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.internal.jdk8.JDK8PlatformImplementations found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.random.jdk8.PlatformThreadLocalRandom found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.streams.jdk8.StreamsKt found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$1 found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$2 found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$3 found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$4 found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.text.jdk8.RegexExtensionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.time.jdk8.DurationConversionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Hi,
Thank you very much for this flutter twitter clone. I am learning appwrite and riverpod from your project.
Hi,
Thank you very much for this flutter twitter clone. I am learning to use Riverpod with AppWrite from your project.
However, I faced some issues while working with Appwrite 9 version in Flutter 3.10.6 (latest stable version). I am currently using Appwrite 1.3.8 local version. Also tested it with AppWrite Cloud. The model.Account was replaced by model.User in AuthAPI and AuthController files. Also the stack trace demangling was used.
void main() {
runApp(
const ProviderScope(
child: MyApp(),
),
);
FlutterError.demangleStackTrace = (StackTrace stack) {
if (stack is stack_trace.Trace) return stack.vmTrace;
if (stack is stack_trace.Chain) return stack.toTrace().vmTrace;
return stack;
};
}
The issues faced are as follows:
final currentUserId = ref.watch(currentUserAccountProvider).value!.$id;
flutter: subscription: ws://192.168.1.148:4003/v1/realtime?project=64b3ea1af0287f509fa5&channels%5B%5D=databases.64b3ecdbe0aea219dd76.collections.64c4cdd09a56cf2bd378.documents
flutter: subscription: null
please Update auth api from model.Account to model.User -> lib/api/auth_api.dart
Hello sir,
first i want to thank you for this long hours of course.
sir, have followed the video and i hav being able to do something wonderful but how ever i keep geting an error, below is screenshot and with my code.
ref.watch(getRepliesToPostProvider(widget.postModel!)).when(
data: (post) {
return ref.watch(getLatestPostProvider).when(
data: (data) {
if (data.events.contains(
'databases.*.collections.${Common.postCollection}.documents.*.create',
)) {
post.insert(0, PostModel.fromMap(data.payload));
} else if (data.events.contains(
'databases.*.collections.${Common.postCollection}.documents.*.update',
)) {
final startingIndex =
data.events[0].lastIndexOf('documents.');
final endIndex =
data.events[0].lastIndexOf('.update');
var postId = data.events[0]
.substring(startingIndex + 10, endIndex);
var newPost = post
.where((element) => element.id == postId)
.first;
final postIndex = post.indexOf(newPost);
post.removeWhere((element) => element.id == postId);
newPost = PostModel.fromMap(data.payload);
post.insert(postIndex, newPost);
}
return Expanded(
child: ListView.builder(
padding: const EdgeInsets.all(0),
shrinkWrap: true,
scrollDirection: Axis.vertical,
physics: const ClampingScrollPhysics(),
itemCount: post.length,
itemBuilder: (BuildContext context, int index) {
var disPost = post[index];
final latestPost =
PostModel.fromMap(data.payload);
bool isPostAlreadyPresent = false;
for (final postLoop in post) {
if (postLoop.id == latestPost.id) {
isPostAlreadyPresent = true;
break;
}
}
return ref
.watch(userDetailsProvider(
widget.postModel!.uid))
.when(
data: (user) {
return Padding(
padding: const EdgeInsets.only(
left: 8.0,
top: 2,
right: 8,
bottom: 2,
),
child: Row(
children: [
CircularProfileAvatar(
user.profile,
radius: 20,
backgroundColor:
Colors.transparent,
borderWidth: 2,
initialsText: Text(
"AD",
style: TextStyle(
color: colorWhite),
),
borderColor: colorWhite,
elevation: 5.0,
foregroundColor: Colors.brown
.withOpacity(0.5),
cacheImage: true,
imageFit: BoxFit.cover,
onTap: () {
print('adil');
},
showInitialTextAbovePicture:
false,
),
const SizedBox(
width: 15,
),
Expanded(
child: Text(disPost.text),
),
],
),
);
},
error: (error, stk) => Container(),
loading: () => Container());
},
),
);
},
error: (error, stk) => ErrorText(
error: error.toString(),
),
loading: () {
return Expanded(
child: ListView.builder(
padding: const EdgeInsets.all(0),
shrinkWrap: true,
scrollDirection: Axis.vertical,
physics: const ClampingScrollPhysics(),
itemCount: post.length,
itemBuilder: (BuildContext context, int index) {
var disPost = post[index];
return ref
.watch(userDetailsProvider(
widget.postModel!.uid))
.when(
data: (user) {
return Padding(
padding: const EdgeInsets.only(
left: 8.0,
top: 2,
right: 8,
bottom: 2,
),
child: Row(
children: [
CircularProfileAvatar(
user.profile,
radius: 20,
backgroundColor:
Colors.transparent,
borderWidth: 2,
initialsText: Text(
"AD",
style: TextStyle(
color: colorWhite),
),
borderColor: colorWhite,
elevation: 5.0,
foregroundColor: Colors
.brown
.withOpacity(0.5),
cacheImage: true,
imageFit: BoxFit.cover,
onTap: () {
print('adil');
},
showInitialTextAbovePicture:
false,
),
const SizedBox(
width: 15,
),
Expanded(
child: Text(disPost.text),
),
],
),
);
},
error: (error, stk) => Container(),
loading: () => Container());
}),
);
});
},
error: (error, stk) => ErrorText(
error: error.toString(),
),
loading: () => const Loader(),
),
thank you very much
if user is running on physical device within same network then in AppwriteConstant-> endpoint -> http://laptopIP:80/v1 instead of http://127.0.0.1:80/v1
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.