Comments (4)
I just want to test out this feature. the draw back is to not push their pubspec.yaml
file. bale gagamitin lang yung github raw user content to load images on the network instead of assets. So that we can dynamically load these images.
class DevImage extends StatelessWidget {
const DevImage(this.imageSource);
final String imageSource;
@override
Widget build(BuildContext context) {
if (kDebugMode) {
return Image.asset(imageSource);
}
return Image.network("https://raw.githubusercontent.com/flutterph/devs/master/${imageSource}");
}
}
What do you think @joshuadeguzman?
from devs.
Hi @Ram231 ,
Thanks for looking into this.
I think we can also simplify this, we can ask for the Github username
instead.
https://avatars.githubusercontent.com/<username>
For example
https://avatars.githubusercontent.com/joshuadeguzman
Before working on this, the links for social handles #19 should be landed first.
At least with this one we will not "host" the assets for these.
What are your thoughts?
from devs.
I think that's good. the file name should be their username so that there won't be overwritten files when they PR.
Example Code:
class DevImage extends StatelessWidget {
const DevImage({this.imageSource,this.username});
final String imageSource; // assets/dev/profile/ram231.png
final String username; // ram231
@override
Widget build(BuildContext context) {
if (kDebugMode) {
return Image.asset(imageSource);
}
return Image.network("https://raw.githubusercontent.com/$username/devs/master/${imageSource}");
}
}
Above code is just a concept. Although it works like that as long as we have a fallback image(placeholder) if the forked repo was archived/deleted.
from devs.
This is merged
from devs.
Related Issues (20)
- [feat] [ux] Add scroll bar when running on web
- [bug] [ux] Scroll touch is working on web.
- [epic] [feat] [ux] Native splash screen HOT 1
- Migrate to using json serialization library with null and type safety (built_value or json_serializer)
- Add: Want to be a Flutter Hero
- Pixel overflow in DevListCardMobile HOT 2
- Add "Nichole John Romero" to Dev Board
- Add Jaymon Rivera details to Dev board. HOT 1
- Add Julie Ann Delda to Dev Board.
- [feat] Add heart loader for page loads
- Update devs.json John Wesley Bodoso
- Unresponsive web view
- Update devs.json Roneal John Denila
- Add Portia Bumanlag Details
- Developers not showing HOT 1
- [feat][ui] Job Board UI Design
- Add Romar Marcos to Dev Board HOT 2
- Add Social Media Account
- Add details
- 30DaysOfFlutter Contact All Contributors HOT 42
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from devs.