luckyseven / avatars Goto Github PK
View Code? Open in Web Editor NEWAn avatar widget that uses the best available data source among those provided (social images, gravatar, name initials, custom)
License: MIT License
An avatar widget that uses the best available data source among those provided (social images, gravatar, name initials, custom)
License: MIT License
Hi , Instagram avatar is blocked after a few requests , I researched it a little and the server sending a log in page , is there any simple solution to that , that doesn't include Login ? and I even tried the log in but accesses token doesn't work , what am I have to do with the cookies ?
The PR #5 that was merged has a bit of an issue. It will always try to rebuild the avatar widget if the ancestor widget requests a rebuild. The effect is clearly visible when using a network image. You would see a flickering effect. This is not a desirable thing, especially when you have large widgets that use the Avatar widget.
Hi, i would like to reload the avatar with new source after event happens ( TextField - onEditingComplete ) , I tried some stuff and it is not working :
1.
ValueListenableBuilder(
valueListenable: _notifier,
builder: (BuildContext context,
List<AvatarAPI.Source> val, Widget? child) {
return AvatarAPI.Avatar(
sources: val,
);
}),
onEditingComplete: () {
_notifier.value = [
AvatarAPI.GitHubSource(_photoname as String),
AvatarAPI.InstagramSource(_photoname as String)
];
},
and update the _notifier.value when the event happens
2. save the all child in var and use SetState to create new one and reload it ,
all of that didn't work , does the app have any controller or notifier for updated ?
Thanks Idan . (You did a great job with that library )
ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: setState() called after dispose(): _AvatarState#118b4(lifecycle state: defunct, not mounted)
This error happens if you call setState() on a State object for a widget that no longer appears in the widget tree (e.g., whose parent widget no longer includes the widget in its build). This error can occur when code calls setState() from a timer or an animation callback.
E/flutter ( 4778): The preferred solution is to cancel the timer or stop listening to the animation in the dispose() callback. Another solution is to check the "mounted" property of this object before calling setState() to ensure the object is still in the tree.
E/flutter ( 4778): This error might indicate a memory leak if setState() is being called because another object is retaining a reference to this State object after it has been removed from the tree. To avoid memory leaks, consider breaking the reference to this object during dispose().
Add "image/jpg" to the list of supported image headers. There is jpeg, png but jpg missing.
Currently the project pulls sqflite, this is pretty unexpected.
Could probably work with a datastore that is web capable.
return GFListTile(
avatar: Avatar(
useCache: true,
backgroundColor: primaryColor,
name: "${service_provider.firstname} ${service_provider.lastname}",
shape: AvatarShape.circle(50),
sources: [
NetworkSource(service_provider.avatar),
GenericSource(NetworkImage(service_provider.avatar))
//...
]),
titleText: service_provider.firstname,
subTitleText: service_provider.about_yourself,
icon: Icon(Icons.favorite));
result:
After adding image/jpg to the code, the Firebase Storage image is not loaded anyway. The avatar widget shows spinning circle.
how can I detect default photo of git-hub or insta ?
Thanks Idan .
It loads at the first time and never loads after.
Suppose that I update the data given to the Avatar widget at run time(for example, after clicking a button) but the avatar is not updated. For example, if I give it an updated image network URL, the avatar displays the old data. Is there any way to force rebuilding the widget when the input changes?
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.