Flutter Heroes
26.1K subscribers
272 photos
2 videos
31.1K links
Download Telegram
New post on /r/flutterdev subreddit:

<b>How to create flutter flow widget</b>
I'am trying to create something like flow layout in flutter. I just need to do something like <a href="https://dump.video/i/zPKfW3.mp4">this</a> on FlexibleGridViev but with a stretch animation. So in my case, I build a matrix based on a list of elements and then change the position of the elements, but when I do this for many elements, I can't figure out how to make them not overlap.help me please!!<a href="https://i.stack.imgur.com/hFEKv.png">enter image description here</a>And here is my class<pre>class UserSuggestion extends StatefulWidget { static final String tag = '/user-suggestion'; UserSuggestion({Key key}) : super(key: key); @override _UserSuggestionState createState() => _UserSuggestionState(); } class _UserSuggestionState extends State<UserSuggestion> with TickerProviderStateMixin { double screenHeight; List<Example01Tile> list; List<SuggestionCategory> items = []; Map<int, List<SuggestionCategory>> suggestionMatrix = { 0: [], 1: [], 2: [], 3: [] }; StreamController onTapListener = StreamController(); @override void initState() { // TODO: implement initState super.initState(); final number = 30; items = List.generate( number, (index) => SuggestionCategory( name: index.toString(), width: 100, height: 100, ), ); int rowCount = (items.length / 4).round(); suggestionMatrix = Map.from(suggestionMatrix.map((key, value) { final endIndex = (rowCount * (key + 1)); return MapEntry( key, items .getRange(rowCount * key, endIndex < items.length ? endIndex : items.length) .toList() .asMap() .entries .map((element) { final val = element.value; final i = element.key; return SuggestionCategory( name: i.toString(), width: 100, height: 100, x: (i) * 100.0, y: (key) * 100.0); }).toList()); })); onTapListener.stream.listen((event) { calculeteNewTapsPositions(event); }); } @override Widget build(BuildContext context) { final isDesktop = isDisplayDesktop(context); screenHeight = MediaQuery.of(context).size.height; return Scaffold(body: Center(child: mobile())); } mobile() { return Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( "Tell me what noo jiu jkwk?", style: Theme.of(context).textTheme.headline2, ).paddingOnly( top: PADDING_TOP_BIG_SUGGESTION, left: PADDING_LR_MEDIUM, right: PADDING_LR_MEDIUM), Flexible( child: grid(), ), ]); } grid() { return SingleChildScrollView( scrollDirection: Axis.horizontal, child: Container( height: 600, width: 800, child: Stack( fit: StackFit.expand, alignment: Alignment.topLeft, children: jjjjjj(), ), )); } List<Widget> jjjjjj() { List<Widget> widgets = []; suggestionMatrix.entries.forEach((columns) { int iColumn = columns.key; List<SuggestionCategory> rowsList = columns.value; rowsList.asMap().entries.forEach((rows) { int iRow = rows.key; SuggestionCategory rowsList = rows.value; rowsList.iColumn = iColumn; rowsList.iRow = iRow; widgets.add(AnimatedPositioned( duration: Duration(milliseconds: 600), curve: Curves.easeInOut, left: rows.value.x, top: rows.value.y, // bottom: bottom, // right: right, height: rows.value.height, width: rows.value.width, child: item(rows.value), )); }); }); return widgets; } void calculeteNewTapsPositions(SuggestionCategory suggestionCategory) { final iRow = suggestionCategory.iRow; final iColumn = suggestionCategory.iColumn; bool needExpand = suggestionCategory.currentWeight > 1; bool isEndExpandIteration = suggestionCategory.currentWeight > 2; List<SuggestionCategory> rowList = suggestionMatrix[iColumn]; //mark for right rows rowList.getRange(iRow + 1, rowList.length).forEach((SuggestionCategory e) { setState(() { if (needExpand) { print("right"); e.x = e.x + 100; } else { print("back"); e.x = e.x - 200; } }); }); //mark for left columns suggestionMatrix.forEach((key, value) { if (key > iColumn) { SuggestionCategory e1 = value.elementAt(iRow); SuggestionCategory e2 = value.elementAt(iRow + 1); SuggestionCategory e3 = value.elementAt(iRow…
New post on /r/flutterdev subreddit:

Navigation Drawer
Can someone give me a link with a good navigation drawer tutorial, teaching the best practices? I've seen some and everyone has a different approach on this subject.

August 06, 2020 at 11:30PM by ioncelciuc
https://ift.tt/3iiUhBM
New post on /r/flutterdev subreddit:

Flutter Firestore with charts_flutter error
I get the error when I try to hook up firestore with charts_flutter, does anyone know what's wrong. I cant find out where I went wrong.I/flutter ( 6709): The following _TypeError was thrown building StreamBuilder<QuerySnapshot>(dirty, state: I/flutter ( 6709): _StreamBuilderBaseState<QuerySnapshot, AsyncSnapshot<QuerySnapshot>>#3c873): I/flutter ( 6709): type 'MappedListIterable<DocumentSnapshot, History>' is not a subtype of type 'List<History>'This is the code ``` import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/material.dart';import 'package:hive/hive.dart'; import 'package:charts_flutter/flutter.dart' as charts;class MachineGraph extends StatefulWidget { MachineGraph({Key key}) : super(key: key);@override _MachineGraphState createState() => _MachineGraphState(); }class _MachineGraphState extends State<MachineGraph> { List<charts.Series<History, String>> _seriesBarData; List<History> myData;_generateData(myData) { _seriesBarData.add(charts.Series( domainFn: (History history, _) => history.time, measureFn: (History history, _) => double.parse(history.data), data: myData, id: "history", )); }@override Widget build(BuildContext context) { return SafeArea( child: Container( child: Scaffold( body: Column( children: <Widget>[ _buildBody(context), ], ), )), ); }Widget _buildBody(BuildContext context) { var box = Hive.box('myBox'); return StreamBuilder<QuerySnapshot>( stream: Firestore.instance.collection(box.get('companyId')).snapshots(), builder: (context, snapshot) { assert(snapshot != null); if (!snapshot.hasData) { return LinearProgressIndicator(); } else { List<History> history = snapshot.data.documents .map((e) => History.fromMap(e.data['history'])); return _buildChart(context, history); } }, ); }Widget _buildChart(BuildContext context, List<History> history) { _generateData(history); return Container( child: Column( children: <Widget>[Expanded(child: charts.LineChart(_seriesBarData))], ), ); } }class History { final String data; final String time;History(this.data, this.time);History.fromMap(Map<String, dynamic> map) : data = map['data'], time = map['time'];@override String toString() { // TODO: implement toString return data.toString(); } } ```

August 07, 2020 at 12:58AM by AIDXN3
https://ift.tt/3gGUyOU
New post on Flutter Dev Google group:

Image and word editing
We have an App which allows the user to easily modify images thru our unique ViewPort - a simple to use image place holder all manipulated by the mouse, further we have interactive text in pre authored templates. User starts with a dashboard and then a simple UI with 16 buttons to carry out

August 07, 2020 at 04:35AM by tutorial atenriched
https://ift.tt/2DkZURv
New post on Flutter Dev Google group:

CodeMagic IOS build - Where put googleService-info.plist
Greetings - I am happy that I have a path for building my IOS app for free through CodeMagic remote mini mac server. However, since I have zero exposure to IOS builds, I am wondering where in my Visual Code IOS structure I should put the googleService-info.plist file. Should I put it under

August 07, 2020 at 05:43AM by Matt Mason
https://ift.tt/3fDdTPv
New post on /r/flutterdev subreddit:

Is Firestore Appropriate for my App
I am making an app where the users can search for preferences about a car and the car that meets those preferences appears. So I expect I have to make a database that holds the different types of cars and their properties. Is firestore the appropriate choice for my app?P.S. I apologize if this is a basic question. I am new to programming lol

August 07, 2020 at 06:08AM by BerryAppleSoup
https://ift.tt/2DGjg3e
New post on /r/flutterdev subreddit:

Hello, I an new to flutter and I was wondering, is it possible to have 1 flutter code running on mobile, web and desktop too?
Thank you

August 07, 2020 at 12:09PM by moment_of_science
https://ift.tt/3a1JlWz
New post on /r/flutterdev subreddit:

Hello flutter developers Please review my article on flutter top plugins which boost your productivity
Hello developer I write an article about .Top plugins which boost your productivity. It is only 2 min read ,I created this list after all my experience I have .If you don't like this post feel free to comment me.Flutter top plugins to save your day

August 07, 2020 at 01:47PM by Professional_Box_783
https://ift.tt/3kociAP
New post on /r/flutterdev subreddit:

Flutter Hive Database easy Tutorial
https://youtu.be/SFcMdQXnM78

August 07, 2020 at 03:44PM by priiimo3
https://ift.tt/2DMXPxa
New post on /r/flutterdev subreddit:

My first article on Flutter. Built an app that plays audio and video files.
https://ift.tt/3kokWiI

August 07, 2020 at 02:48PM by vishnukvs
https://ift.tt/3gHvBCM
New post on /r/flutterdev subreddit:

Tomorrow: Flutter Remote Meetup | Flutter BLR x GeekyAnts
Here's the detailed agenda of tomorrow's Flutter Remote Meetup:​12:00 PM - 12:15 PM - Keynote by Pushkar Sharma12:15 PM - 12:35 PM - AI with Flutter - By Rishit Dagli12:35 PM - 12:55 PM - Widget Testing - The Untold Story - By Devanand P12: 55 PM - 01:15 PM - Working with Device Camera in Flutter - By Ayush Shekhar01:15 PM - 01:35 PM - Flutter Apps powered by GraphQL with Hasura - By Sivamuthu01:35 PM - 01:55 PM - Myths & Facts about Architecture & Principles - By Nitish Sahani​The event will be streamed live on GeekyAnts's YouTube channel: https://bit.ly/geekyants-youtubeStay updated following this link : https://bit.ly/flutterblr-9#flutterblr #flutterverse #Flutter #flutterdev

August 07, 2020 at 03:30PM by geekyants
https://ift.tt/2C5ULfd
New post on /r/flutterdev subreddit:

Our First Flutter App
Hey flutter dev'sTLDR; we are looking for some helpful constructive feedback :D
https://github.com/Barttje/Pokemon-FlutterA friend and myself have build a pokemon app to test drive flutter. We've build some small apps, but this one was a bit bigger. We also used GraphQL as api communication.We would like to have some feedback, or things we can improve on to make the app better! You can even make pull request if you feel like it :DSome of the things we had troubles with:
- we are not really following responsive designs (e.g. we have a lot of fixed sizes)
- we started building huge components, and later on we decided to divide a bit more in smaller separate ones. However we are not sure how we should organize/divide widgets
- we have a hero widget, but that doesn't work properly. We see it happening because of the loading in the widgets, it probably is related to the separation of widgets.

August 07, 2020 at 05:02PM by Osicka
https://ift.tt/3icizNU
New tweet from FlutterDev:

☑️This #FlutterFriday learn how to up your static checking game!

Want more static checking than Dart provides by default? Use package:meta and its annotations like @required, @visibleForTesting or @immutable.

Learn more &rarr; https://t.co/haUs0Earx3 pic.twitter.com/ab0fFYLyHA— Flutter (@FlutterDev) August 7, 2020

August 07, 2020 at 05:17PM
http://twitter.com/FlutterDev/status/1291755359200096257