62 questions
0
votes
1
answer
69
views
tried flutter positioned in stack with media query but on different devices it doesnt work
I am working on a vpn app and on one of the screens i have to use stack for showing different widgtes over each other like gradient below and a globe svg on top and then a circularProgressIndicator on ...
0
votes
2
answers
62
views
how to place one container over another container - Flutter
I am trying to do this particular design for the Login page.
But the result I got it is on below:
The code I tried is:
Stack(
fit: StackFit.passthrough,
...
0
votes
0
answers
40
views
Using Positioned with Offset.fromDirections in Flutter
I am currently trying to place Image.asset widgets in a circle based on the degrees. I have tried using the Positioned and Offset.from Direction, but the values seem to be off.
I have split the ...
0
votes
1
answer
127
views
how to make Positioned widget in top layer of parents
this is the home page :
@override
Widget build(BuildContext context) {
return Scaffold(
body: LayoutBuilder(
builder: (BuildContext context, BoxConstraints ...
0
votes
1
answer
178
views
Get error of size.isFinite when set positioned for container in stack Flutter
I have set positioned as children in Stack.
But when running the code, the error shows this type:
Failed assertion: line 600 pos 12: 'size.isFinite': is not true.
This is my full code. I have used ...
0
votes
0
answers
87
views
get error of size.isFinite when set positioned for container in stack
I have set positioned as children in Stack.
but when run the code the error show this type:
Failed assertion: line 600 pos 12: 'size.isFinite': is not true.
this is my code
double width = 200.0;
...
1
vote
0
answers
104
views
get error of size.isFinite when set top, bottom, left and right for positioned in stack
I have 3 positioned as children of Stack inside of ListView.builder also set top and right for all 4 positioned when run, got this error
size.isFinite
if used in the demo the stack and inside of ...
-1
votes
1
answer
69
views
Why the scroll is not working when i wrap a scrollable widget with positioned inside a stack
import 'package:trekmate_project/widgets/choice%20chips/scroll_sample.dart';
class ContainerSample extends StatelessWidget {
const ContainerSample({super.key});
@override
Widget build(...
0
votes
1
answer
436
views
In Flutter, how to position a widget "x" pixels from the top of the stack but also have it horizontally centered?
I am using Flutter to create an app. I have a stack and want to position one of its child widgets (an svg picture) to be exactly 270 pixels from the top of the screen, and be centered horizontally at ...
3
votes
2
answers
1k
views
How can i place cancel icon on top right corner
Here is my code
InkWell(
onTap: () {
Navigator.pop(context);
},
child: Align(
...
2
votes
1
answer
1k
views
I want to scale a widget using gesture detector that can also be dragged around the screen in flutter
So far I've been able to drag the widget around the screen but the scale doesn't change.
I've printed the scale and it is always shown to be one.
Here's the code I've written
Positioned(
...
1
vote
1
answer
778
views
Positioned widget with GestureDetector, Dragging a widget will go off the screen
Im trying to Drag a container with GestureDetector, but when i dragg to the edges of the screen the container is going off the screen.
I wanted it to stop when it reaches the edges of the screen.
...
0
votes
1
answer
92
views
For the below program, How Textfield move up when keyboard appears in flutter?
For the below program, How Textfield move up when keyboard appears in flutter ?
I already tried resizeToAvoidBottomInset and SingleChildScrollView, But there is no use.
Please check and suggest the ...
0
votes
2
answers
1k
views
How to stop overlaying in a positioned stack when keyboard is opened
I have this Positioned Stack and when I open the keyboard to enter in the textField it overlays everything and all the widgets move up. How can I stop it and keep them in the same position?
@override
...
0
votes
1
answer
126
views
How to Position inside a Stack widget
I have this Stack widget and a Positioned widget inside it. But the position of it doesn't change according to the properties of Positioned.
Widget build(BuildContext context) {
return Scaffold(
...
1
vote
0
answers
156
views
Flutter - Responsive Position of Widget among various Screen Sizes
I'm working on something that would be similar to a Story feature like you see on Instagram or Snapchat.
My goal is to be able to add my own custom widgets, save what I create, and then display it ...
-1
votes
2
answers
1k
views
How can i add the images stacked over one another
I want to add a different persons image as attached(The images inside circle avatar stacked over one another).How to achieve this.
I tried the following code but didn't get the result as expected
...
1
vote
1
answer
290
views
get error of size.isFinite when set top and right for positioned that nested in stack
I have 3 positioned as children of Stack inside of ListView.builder
also set top and right for all 3 positioned when run, got this error
size.isFinite
Also I have error that
buttom overflowd by102 ...
0
votes
1
answer
2k
views
Flutter LayoutBuilder BoxConstraints(unconstrained) inside Positioned inside Stack (BoxConstraints forces an infinite width and infinite height)
I have an Stack with multiple children, some of them inside of Positioned with different vertical and horizontal values setted.
Some of the childs need to know the Stack constraints in order to ...
0
votes
1
answer
36
views
How can I center a Positioned while also making it wide?
So I have a Positioned widget (the DottedBorder widget provided by the package of the same name is a Positioned):
Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
...
1
vote
1
answer
1k
views
Flutter: How to keep offset when resize widget after rotated?
My main goal is, to create a flexible widget with features.
manage widget position.
rotate widget.
Resize the widget from all sides.
1 and 2, I've managed to make. but the 3rd point, when the widget ...
-2
votes
1
answer
119
views
How to hide bottomsheet when keyborad is up
i Want to fix the bottomsheet down when keyboard comes up
Here is the code strcuture how i created the stack
3
votes
1
answer
1k
views
Flutter: after rotate widget inside stack, when changing the position it is move wrong direction
i try to rotate the widget and then try to move around, it moves into different direction.
I'm realize, I need another calculation to normalize the position when its move, with condition rotate more ...
2
votes
2
answers
5k
views
How can I position widget (problem with Positioned and Stack Widget)?
I've got a problem with Stack and Positioned widget.
I'm trying to do something like this (picture below).
But instead I have something like this.
How can I move this mid rectangle up, to have ...
1
vote
1
answer
299
views
animated positioned toke too much space - flutter
animated positioned took too much space while changing the position. the question is there is any way to minimize this space ?
it ascends to safeare
the source code is below so you can try it:
class ...
1
vote
1
answer
4k
views
AnimatedPositioned - how to change position automatically without pressing button
i want to use the animated positioned class to change widget position with the launch of the screen without pressing a button!
class MyStatefulWidget extends StatefulWidget {
const MyStatefulWidget({...
0
votes
1
answer
524
views
flutter : use index in position , stack parent
i have to use index in position , but when I use listView.builder for I , I got this error :
Incorrect use of ParentDataWidget.
The ParentDataWidget Positioned(left: 157.2) wants to apply ParentData
...
0
votes
2
answers
3k
views
flutter : positioned not move in stack
I have a stack and I want to use listviewBuilder in it.
and I use positioned in list view, but position not work and don't move,
can anyone help me, please?
it's my list :
List timeBookMark = [200.0, ...
-2
votes
1
answer
2k
views
Dynamically position widget in stack Flutter
I am trying to create a view that consist of a background image with widgets positioned dynamically in certain places on this image, each widget will have an x and y that needs to be calculated for ...
1
vote
2
answers
1k
views
'Positioned' Widget not positioning 'Text' widget properly-Flutter
Needed the Alexis Sanchez Text to be under the picture but for some reason, its going right at the bottom of the screen, I am not being able to figure out why. Here is my code:
import 'package:...
0
votes
0
answers
204
views
Changing parent of Positioned in Stack and translate it smoothly from position of previous parent to new parent
I have an AnimatedPositioned inside bottom stack and I want it to slide into New Parent Stack at the center when I tap on it.
The problem is, bottom Stack's children (the AnimatedPositioned and other ...
0
votes
1
answer
1k
views
How to set left and top in a Positioned widget in pixels or any other units in Flutter/Dart?
How can I set the left and top of a Positioned widget in pixels or any other units in Flutter/Dart?
What unit are the left and top values in? Are they in percents or independent pixels or something? ...
1
vote
1
answer
783
views
Flutter, setting positioned widgets dynamically
I have a UI like
Now I want to create the letters on circle by given data. I need it to be a dynamic, when letters are less, (like 3 or 4) they must be far from each other. But, when they many (10 or ...
0
votes
2
answers
3k
views
Flutter: Wrap container around Stack with Positioned children
I want to center a Stack widget that includes Positioned children. The size of the Stack is not known before rendering.
Unfortunately, the Stack seems to have an unlimited size (as seen, when wrapping ...
1
vote
2
answers
808
views
I'm not able to add textfield inside positioned widget in flutter
I'm not able to add textfield inside positioned widget. Could someone help me with the code
import 'package:flutter/material.dart;
import 'dart:math' as math;import 'dart:math' as math;import 'dart:...
0
votes
1
answer
1k
views
Flutter: why is a Positioned widget transparent over a TextField?
Why is the Positioned red widget transparent, so that the Second Label Text widget can be seen through it?
Setup:
Column:
Stack
TextField
Positioned
Red Container
TextField (Second Label Text)
The ...
3
votes
3
answers
5k
views
How to clip the corners of Positioned widget in flutter
Here is the output which I am getting:
I want to clip the green Positioned widget on corners with that of grey Container's rounded corners.
Any Help will be highly appreciated.
My current code:
...
5
votes
3
answers
3k
views
How to prevent Overlay from covering AppBar?
I have a custom widget positioned in a Stack. This custom widget creates an OverlayEntry linked to its position and inserts it into an Overlay.
The problem is that this overlay floats above the AppBar ...
3
votes
0
answers
644
views
Flutter : InteractiveViewer inside Stack
Problem :
I am trying to scale widgets inside a Stack but that does not seem to work.
The solution was to add constrained: false to the InteractiveViewer.
But then, it throws error saying "...
4
votes
1
answer
3k
views
Flutter : Drag Widgets across screen (Not Drag and Drop)
I want to just drag widgets across screen, not drag and drop.
But, whenever I leave it and start dragging again, it starts getting drag from the position it started with. As if it was reset.
My guess ...
0
votes
1
answer
1k
views
Flutter - Positioned inside Stack inside Row doesn't render
I'm trying to position the search icon inside the perimeter of the first input in the Row but getting errors and blank screen.
The code without Stack and Positioned works:
Row(
...
1
vote
0
answers
661
views
Constrainting layout to not go out of bounds with Positioned widget
I am currently working on a layout that displays a Positioned widget on the entire screen.
It's positioning itself close to the detected barcode, Look at the image below for an example.
But when the ...
3
votes
2
answers
4k
views
How to position children in a Stack in flutter?
I have a Stack containing 2 Positioned children widgets, one of them containing a CircleAvatar widget and the other a Column widget.
The Column widget contains two InkWell widgets but when I add a ...
2
votes
1
answer
3k
views
Flutter: responsive Positioned in Stack
I want to place icon out of parent bounds and make it responsive (relative to parent's height).
There is no problem to place an icon outside from parent bounds with Stack and Positioned widgets.
But ...
2
votes
2
answers
4k
views
Flutter Positioned Widget not fixed depending size screen
My problem concerns the Positioned Widget. I'd like to position Widgets that match with an ExactAssetImage location of a Container. The context is to apply a PDF sheet to mobile with many assets with ...
0
votes
1
answer
1k
views
Put fixed points on PhotoView in Flutter
Before I tell you my problem, I want to tell you what is my app doing. I have a PhotoView widget library which allows me to zoom in/out my image. And I have a GestureDetector widget which detects when ...
0
votes
2
answers
1k
views
Flutter Dart layouts, Stack, Positioned how to stretch matrix of Material Buttons over whole screen
How can I have matrix of material buttons stretch across whole screen, if I just use height they will stretch to little or out of the screen based on screen size?
I can do that easily just in matrix ...
1
vote
0
answers
1k
views
How do you position a PageView inside a Stack?
I have a PageView and a button inside a Stack (the PageView is at the bottom of the Stack). I have the button in the bottomCenter using Stack's alignment property.
I want to position the PageView ...
0
votes
2
answers
116
views
Flutter, How to set Alignment in a PositionedWidget in a StackWidget?
How to make it possible to Center the Animation?
I'm using the https://pub.dev/packages/simple_animations package.
I have a Stack with multiple Positioned Widgets, with Animations as childs.
The issue ...
0
votes
2
answers
4k
views
"RenderStack object was given an infinite size during layout" when using Positioned inside a Stack
I'm creating a widget that presents a Stack inside a Container. Inside the Stack there is a dynamic Column inside a Positioned widget, which sticks the Column to the Bottom.
I am trying to wrap the ...