jakebonk / flutterboardview Goto Github PK
View Code? Open in Web Editor NEWBoardView written for the flutter framework.
License: BSD 2-Clause "Simplified" License
BoardView written for the flutter framework.
License: BSD 2-Clause "Simplified" License
First of all thanks for creating brilliant component!
I've try with your tutorial in Example folder everything work fine
Do you have any example for using rest api to create board view instead of hard code to List?
^^^^^^^^^^^^^
/C:/Users/username/AppData/Local/Pub/Cache/hosted/pub.dev/boardview-0.2.2/lib/vs_scrollbar.dart:177:50: Error: The getter 'showTrackOnHover' isn't defined for the class 'ScrollbarThemeData'.
For now there's only animating to BoardList
(unless I missed how to use it). I would really appreciate adding animating to a BoardItem
.
Thank you.
Can you also add a Vertical direction as well? It is more convenient and useful that way. It will be very helpful.
Great package btw.
i tried using this plugin to move item from one list to other. i followed example in github. but it only shows list headers for me.
i need to add some items to list. how to achieve them. can i add listtile to those list(custom widgets)?
Hi,
when moving an item from somewhere in the lists to the top left it occurs that the null-check of draggedListIndex
fails.
It seems that .whenComplete((){
is somehow in the asyncronous call is called twice but I couldn't really dive deeper into the logic, maybe you have a clue.
Crash log:
I/flutter (13850): [2022-01-30 07:52:38.658171 | Catcher | INFO] ============================== CATCHER LOG ==============================
I/flutter (13850): [2022-01-30 07:52:38.658806 | Catcher | INFO] Crash occurred on 2022-01-30 07:52:38.657085
I/flutter (13850): [2022-01-30 07:52:38.659022 | Catcher | INFO]
I/flutter (13850): [2022-01-30 07:52:38.665425 | Catcher | INFO] ------- DEVICE INFO -------
I/flutter (13850): [2022-01-30 07:52:38.668144 | Catcher | INFO] id: RSR1.201013.001
I/flutter (13850): [2022-01-30 07:52:38.669514 | Catcher | INFO] androidId: a4eb8febffeede56
I/flutter (13850): [2022-01-30 07:52:38.671544 | Catcher | INFO] board: goldfish_x86
I/flutter (13850): [2022-01-30 07:52:38.673091 | Catcher | INFO] bootloader: unknown
I/flutter (13850): [2022-01-30 07:52:38.673414 | Catcher | INFO] brand: google
I/flutter (13850): [2022-01-30 07:52:38.673602 | Catcher | INFO] device: generic_x86_arm
I/flutter (13850): [2022-01-30 07:52:38.673771 | Catcher | INFO] display: sdk_gphone_x86_arm-userdebug 11 RSR1.201013.001 6903271 dev-keys
I/flutter (13850): [2022-01-30 07:52:38.674629 | Catcher | INFO] fingerprint: google/sdk_gphone_x86_arm/generic_x86_arm:11/RSR1.201013.001/6903271:userdebug/dev-keys
I/flutter (13850): [2022-01-30 07:52:38.675092 | Catcher | INFO] hardware: ranchu
I/flutter (13850): [2022-01-30 07:52:38.675526 | Catcher | INFO] host: abfarm-us-west1-c-0007
I/flutter (13850): [2022-01-30 07:52:38.675647 | Catcher | INFO] isPhysicalDevice: false
I/flutter (13850): [2022-01-30 07:52:38.675738 | Catcher | INFO] manufacturer: Google
I/flutter (13850): [2022-01-30 07:52:38.675944 | Catcher | INFO] model: sdk_gphone_x86_arm
I/flutter (13850): [2022-01-30 07:52:38.676414 | Catcher | INFO] product: sdk_gphone_x86_arm
I/flutter (13850): [2022-01-30 07:52:38.676522 | Catcher | INFO] tags: dev-keys
I/flutter (13850): [2022-01-30 07:52:38.676615 | Catcher | INFO] type: userdebug
I/flutter (13850): [2022-01-30 07:52:38.676703 | Catcher | INFO] versionBaseOs:
I/flutter (13850): [2022-01-30 07:52:38.676807 | Catcher | INFO] versionCodename: REL
I/flutter (13850): [2022-01-30 07:52:38.678090 | Catcher | INFO] versionIncremental: 6903271
I/flutter (13850): [2022-01-30 07:52:38.678334 | Catcher | INFO] versionPreviewSdk: 0
I/flutter (13850): [2022-01-30 07:52:38.678499 | Catcher | INFO] versionRelease: 11
I/flutter (13850): [2022-01-30 07:52:38.686513 | Catcher | INFO] versionSdk: 30
I/flutter (13850): [2022-01-30 07:52:38.686778 | Catcher | INFO] versionSecurityPatch: 2020-09-05
I/flutter (13850): [2022-01-30 07:52:38.686994 | Catcher | INFO]
I/flutter (13850): [2022-01-30 07:52:38.688534 | Catcher | INFO] ------- APP INFO -------
I/flutter (13850): [2022-01-30 07:52:38.689257 | Catcher | INFO] environment: debug
I/flutter (13850): [2022-01-30 07:52:38.689520 | Catcher | INFO] version: 0.9.1
I/flutter (13850): [2022-01-30 07:52:38.691351 | Catcher | INFO] appName: XXX
I/flutter (13850): [2022-01-30 07:52:38.691787 | Catcher | INFO] buildNumber: 202201291
I/flutter (13850): [2022-01-30 07:52:38.692339 | Catcher | INFO] packageName: XXX
I/flutter (13850): [2022-01-30 07:52:38.692592 | Catcher | INFO]
I/flutter (13850): [2022-01-30 07:52:38.692756 | Catcher | INFO] ---------- ERROR ----------
I/flutter (13850): [2022-01-30 07:52:38.692957 | Catcher | INFO] Null check operator used on a null value
I/flutter (13850): [2022-01-30 07:52:38.693181 | Catcher | INFO]
I/flutter (13850): [2022-01-30 07:52:38.693323 | Catcher | INFO] ------- STACK TRACE -------
I/flutter (13850): [2022-01-30 07:52:38.693588 | Catcher | INFO] #0 BoardViewState.build.<anonymous closure> package:boardview/boardview.dart:503
I/flutter (13850): [2022-01-30 07:52:38.694075 | Catcher | INFO] #1 _rootRun (dart:async/zone.dart:1420:47)
I/flutter (13850): [2022-01-30 07:52:38.694714 | Catcher | INFO] #2 _CustomZone.run (dart:async/zone.dart:1328:19)
I/flutter (13850): [2022-01-30 07:52:38.696102 | Catcher | INFO] #3 _FutureListener.handleWhenComplete (dart:async/future_impl.dart:203:18)
I/flutter (13850): [2022-01-30 07:52:38.696368 | Catcher | INFO] #4 Future._propagateToListeners.handleWhenCompleteCallback (dart:async/future_impl.dart:737:39)
I/flutter (13850): [2022-01-30 07:52:38.697425 | Catcher | INFO] #5 Future._propagateToListeners (dart:async/future_impl.dart:793:11)
I/flutter (13850): [2022-01-30 07:52:38.697798 | Catcher | INFO] #6 Future._completeWithValue (dart:async/future_impl.dart:602:5)
I/flutter (13850): [2022-01-30 07:52:38.698862 | Catcher | INFO] #7 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:264:13)
I/flutter (13850): [2022-01-30 07:52:38.700419 | Catcher | INFO] #8 ScrollController.animateTo (package:flutter/src/widgets/scroll_controller.dart)
package:flutter/…/widgets/scroll_controller.dart:1
I/flutter (13850): [2022-01-30 07:52:38.700765 | Catcher | INFO] <asynchronous suspension>
I/flutter (13850): [2022-01-30 07:52:38.701310 | Catcher | INFO]
I/flutter (13850): [2022-01-30 07:52:38.701552 | Catcher | INFO] ------- CUSTOM INFO -------
I/flutter (13850): [2022-01-30 07:52:38.701705 | Catcher | INFO] ======================================================================
My two lists are initialized with 2 itens.
I move all from the first list to second one.
Then, I try to add an item of the second list to the first list.
Throws the exception:
RangeError (index): Invalid value: Valid value range is empty: 1
Edit: I've made a small overloading on constructor of BoardView to support a custom width instead the default value.
My full code:
import 'package:boardview/board_item.dart';
import 'package:boardview/board_list.dart';
import 'package:boardview/boardview.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class MyExample extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return MyExampleState();
}
}
class MyExampleState extends State<MyExample> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Expanded(
child: BoardView(
lists: _get() + _get(), width: 150,
)),
]),
);
}
List<BoardList> _get() {
var boardItem0 = BoardItem(
item: Container(
height: 20,
color: Colors.indigo[100],
child: Text(
'ABC',
style: TextStyle(fontSize: 12),
)));
var boardItem1 = BoardItem(
item: Container(
height: 20,
color: Colors.purple[100],
child: Text(
'123',
style: TextStyle(fontSize: 12),
)));
var listBoardItems = List<BoardItem>();
listBoardItems.add(boardItem0);
listBoardItems.add(boardItem1);
var boardList = BoardList(
headerBackgroundColor: Colors.green,
header: Container(
height: 50,
color: Colors.blue,
),
items: listBoardItems,
footer: Container(
height: 50,
color: Colors.red,
));
var listBoardListItems = List<BoardList>();
listBoardListItems.add(boardList);
return (listBoardListItems);
}
}
Gif attached:
Hi, how can I add RefreshIndicator to BoardView?
Thx!
Can we please have an option for BoardView to take up only the amount of space that the BoardItems need?
I'm getting unbounded height errors and I'm not sure how I could make it resize according to its parent because the parent also resizes itself based on its content.
Thank you for this package btw, it does exactly what I needed.
How can I create a list board that is working up/down? not left/right
thanks
Thanks for creating this package!
We're connecting the board to a REST API and would like to update it after we've saved the data to the server. The challenge is the scroll position is lost when the widget is recreated.
Is it possible to track the scroll position and then set the position when the widget is rebuilt?
/flutter ( 4415): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
E/flutter ( 4415): #0 BoardViewState.build. (package:boardview/boardview.dart:570:53)
E/flutter ( 4415): #1 _RootZone.run (dart:async/zone.dart:1655:54)
E/flutter ( 4415): #2 _FutureListener.handleWhenComplete (dart:async/future_impl.dart:199:18)
E/flutter ( 4415): #3 Future._propagateToListeners.handleWhenCompleteCallback (dart:async/future_impl.dart:810:39)
E/flutter ( 4415): #4 Future._propagateToListeners (dart:async/future_impl.dart:866:11)
E/flutter ( 4415): #5 Future._completeWithValue (dart:async/future_impl.dart:641:5)
E/flutter ( 4415):
E/flutter ( 4415):
: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
../…/lib/boardview.dart:307
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../flutter/packages/flutter/lib/src/widgets/binding.dart').
package:flutter/…/widgets/binding.dart:1
WidgetsBinding.instance!.addPostFrameCallback((Duration duration) {
^
: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
../…/lib/boardview.dart:569
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../flutter/packages/flutter/lib/src/widgets/binding.dart').
package:flutter/…/widgets/binding.dart:1
WidgetsBinding.instance!.addPostFrameCallback((timeStamp) {
^
: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.
../…/lib/board_item.dart:92
- 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('../../flutter/packages/flutter/lib/src/widgets/binding.dart').
package:flutter/…/widgets/binding.dart:1
WidgetsBinding.instance!
^
: Warning: Operand of null-aware operation '?.' has type 'SchedulerBinding' which excludes null.
../…/lib/table_sticky_headers.dart:115
- 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('../../flutter/packages/flutter/lib/src/scheduler/binding.dart').
package:flutter/…/scheduler/binding.dart:1
SchedulerBinding.instance?.addPostFrameCallback((_) {
I can help you if you need any help :)
Using Flutter 2.5, the board works only on mobile devices.
If I have time will try to find the cause.
Allow specifying container widget for the list body (e.g. Card) to allow full-customization of look and feel.
How Can I Run This Code Using The GitHub URL.
When dragging list or items, the page scrolls to the left of the nearest list making the dragging objects hard and confusing.
How do you display scroll indicators inside BoardView and its individual BoardLists?
my yaml file:
environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
boardview: ^0.2.1
When I flutter run
../../developer/flutter/.pub-cache/hosted/pub.dartlang.org/boardview-0.2.2/lib/vs_scrollbar.dart:321:31: Error: Too many positional arguments: 1 allowed, but 2 found.
Try removing the extra positional arguments.
if (isPointerOverScrollbar(event.position,PointerDeviceKind.mouse)) {
../../../.pub-cache/hosted/pub.dev/boardview-0.2.2/lib/vs_scrollbar.dart:143:5: Error: No named parameter with the name 'isAlwaysShown'.
isAlwaysShown: isAlwaysShown,
^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/boardview-0.2.2/lib/vs_scrollbar.dart:174:14: Error: The getter 'isAlwaysShown' isn't defined for the class '_MaterialScrollbar'.
FAILURE: Build failed with an exception.
Where:
Script '/home/anselm/snap/flutter/common/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy' line: 1297
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command '/home/anselm/snap/flutter/common/flutter/bin/flutter'' finished with non-zero exit value 1
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.
I am using this library pls add this functionality in BoardView Library .
there should be a parameter in Board View for adding a addNewList Button View at the end of board list .. on tap of that button we can add new board list on that index . and loaded Board list should not be dragged across that addNew button
when a BoardList has many Items which we can see while scrolling maually . but when we move any item from one index to another in same list which has many items then moving vertically scrolling automatically not working . it should be scroll automatically upward and downward when we drag any item verticaly . suppose i am to drag and drop any BoardItem from 0th index to 20th index then i can not move it in one Drag becasue of not auto scrolling . pls solve this issue in package .
Launching lib/main.dart on RMX1801 in debug mode...
/home/amar/.pub-cache/hosted/pub.dev/vs_scrollbar-0.2.1/lib/vs_scrollbar.dart:143:11: Error: No named parameter with the name 'isAlwaysShown'.
isAlwaysShown: isAlwaysShown,
^^^^^^^^^^^^^
/home/amar/.pub-cache/hosted/pub.dev/vs_scrollbar-0.2.1/lib/vs_scrollbar.dart:174:14: Error: The getter 'isAlwaysShown' isn't defined for the class '_MaterialScrollbar'.
FAILURE: Build failed with an exception.
Where:
Script '/home/amar/snap/flutter/common/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy' line: 1297
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command '/home/amar/snap/flutter/common/flutter/bin/flutter'' finished with non-zero exit value 1
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.
BUILD FAILED in 23s
I can't get the code to works. I'm able to draw a list, but it's not dragging items...
Here's my code:
import 'package:boardview/board_item.dart';
import 'package:boardview/board_list.dart';
import 'package:boardview/boardview.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class MyView extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return MyViewState();
}
}
class MyViewState extends State<MyView> {
@override
Widget build(BuildContext context) {
var boardItem0 = BoardItem(
item: Container(
height: 8,
child: Text(
'TESTE 0',
style: TextStyle(fontSize: 12),
)));
var boardItem1 = BoardItem(
item: Container(
width: double.maxFinite,
height: 10,
child: Text(
' TESTE 1 ',
style: TextStyle(fontSize: 12),
)));
var listBoardItems = List<BoardItem>();
listBoardItems.add(boardItem0);
listBoardItems.add(boardItem1);
var boardList = BoardList(
backgroundColor: Colors.yellow,
items: listBoardItems,
index: 0,
footer: Container(height: 50));
var listBoardListItems = List<BoardList>();
listBoardListItems.add(boardList);
var boardView0 = BoardView(lists: listBoardListItems);
return Container(
child: boardView0,
);
}
}
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.