How to create a dynamic layout in flutter - flutter

i want to write a flutter app that is completely dynamic. That means that I can define how the app should look on the server. Whether you should have a top area that I can fill dynamically with widgets. Does anyone have an idea how this can best be implemented in flutter?
An example for a server response would be:
{
area: top,
columns: 3
rows: 5,
items: [
position: {
row: 2
column: 3
}
type: button,
event: event
]
}, {
area: left,
width: 20%,
rows: 5,
items: [
.....
]
}
That is only an idea how the response could look like.

Sounds like you're heading for something disparagingly called the "inner system" effect, where you want to write code that interprets data as if it were more code. Please don't.

Related

Format or styling label in apache echarts markLine

I need format label in the markline. Is possible add image backround, or in general custom styling?.
Is possible draw the markLine over the candles?, because at the moment when the markline goes down, the candles cover the label.
I would like to do something like what is shown this picture:
EDIT:
This is my actual code
m.setOption(
{
series: {
markLine: {
symbol: 'none',
label:
{
position: 'middle',
show: true,
},
lineStyle: {
color: mc,
//type: 'solid'
},
data: [{yAxis: window.wsData[1], name: 'Tiker'}],
position: 'insideStartTop'
}
}
}
)
This labels has limit to improve deep custom design. By my opinion it's right decision because many developers don't understand design and other people will frustrate due incorrect style, color, position... But we are developers and no one can interfere with our love for real art, hehe )
Try to implement this options: https://stackoverflow.com/a/64875984/1597964

How to change field style in the sanity io user interface?

How can I change a style of a component easy? I just want limit a text-field height in a sanity user inerface.
It is uncomfortable to scroll all the text every time. Where can I write something like that:
{
overflow-y: auto;
height: 200px;
}
From the screenshot provided in the question, it seems you're using rexxars markdown plugin for Sanity. When defining the markdown field in your schema, you have some options to choose from. I'm guessing what you want is a low minimum number of rows and to disable auto grow? E.g.:
export default {
name: 'blogPost',
title: 'Blog Post',
type: 'document',
fields: [
// ... other blogPost fields
{
name: 'body',
title: 'Body',
type: 'markdown',
options: {
minRows: 10,
autoGrow: false
}
}
]
}
If the options you need aren't available, try creating an issue or submit a pull request, proposing the change you need?
I've tried patch-package. Just followed instructions in the package.

modify the heigth of the bars series in echarts

I currently have a map loaded, and I have some bars on the map. I would like to include my variable text_toltip[i] in the tooltip so that the coordinates and text of the variable text_toltip[i] are displayed in each bar. how can I do it? I'm new in this library.
I know that there is an attribute called minHeight, which allows to establish a minimum height for the bars, but I would like to establish a maximum predetermined size for the bars and so the other sizes and colors of the bars are calculated. how can I do it?
series: [{
type: 'bar3D',
coordinateSystem: 'geo3D',
barSize:0.05,
minHeight:0.05,
data: data.map(function (item) {
return {
value: [item[0], item[1], item[2]],
label: {
show: false
}
}
}),
shading: 'lambert'
}]
https://plnkr.co/edit/Tdwwk8yKCi0fiY7I3AqK?p=preview
Thank you.
For this question,I read the Echarts's documentation and found a property belonging to "geo3D called "boxHeight" ,which can play the same role as you say "maxheight".I've tested it,no problem.
boxHeight

Form and Grid inside a Tab in EXT-JS app

I am trying to display a search-form and grid in EXT-JS application. I am trying this:
items: [
{
title: 'myTab',
xtype: 'myform',
xtype:'mygrid',
flex:1
}
]
My Problem: When I comment out
xtype: 'mygrid'
I can see the search form. When I uncomment the line, grid overlaps the form. how can I solve this problem?
UPDATE: I see that I need to use vbox layout. I a m trying it in various ways, but unable to figure out where it should be placed.
You're mixing arrays (i.e. [...]), and objects (i.e. {...}).
The items option in Ext containers must be an array of objects. Objects in there can be raw configuration object or instantiated components.
So the syntax you must use looks like the following:
items: [
{
title: 'myTab',
xtype: 'myform'
},{
title: "Grid Tab",
xtype:'mygrid'
}
]
See, this is similar to an array of integers like [1,2,3] except that elements are objects {...} instead of numbers.
I figured it out. This is how I added layout to the code:
items: Ext.create('Ext.tab.Panel', {
activeTab: 0,
layout : { // This is how to save the form from being overlapped by the
//grid panel.
type: 'vbox',
align: 'fit'
},
items: [
{
title: 'Single-Activity Resource',
items : [
{
xtype:'myform'
},
{
xtype:'mygrid',
flex: 1
}
]
} ...

How to move between panels in Sencha touch

When moving between panels I get the following error
[WARN][Ext.Component#constructor] Registering a component with a id (`logOutButton`) which has already been used. Please ensure the existing component has been destroyed (`Ext.Component#destroy()`.
I can go back to the previous screen but the cannot go forward again without getting the above error.
To combat this I have tried using the code below, but it does not work. Can anyone help me out?
var loginView = Ext.getCmp('login');
if(!loginView){
Ext.getCmp('loginTest2').destroy();
loginView = Ext.create('com.view.Login');
}
Ext.Viewport.setActiveItem('login');
I also tried:
if(Ext.getCmp('login')){
Ext.Viewport.setActiveItem('Login');
}else{
Ext.Viewport.setActiveItem(Ext.create('com.view.Login'));
}
Neither of these work and result in the same error and a blank screen. I am using Sencha Touch 2.
we can simply use following line to navigate from one panel to another..
Ext.Viewport.animateActiveItem({ xtype: "cat" }, { type: "slide", direction: "up" });
here, xtype is that we can define for the panel we want to display, like this...,
Ext.define('BeLocal.view.LeftCurveList', {
extend: 'Ext.Panel',
**xtype: 'cat',**
config: {
items: [
{
xtype: 'toolbar',
docked: 'top',
width: '100%',
padding:0,
title: 'BeLocal Places',
items:[{
xtype: 'button',
ui: 'back',
text: 'Back',
]
},
]
}
});
To avoid this error do not use id for button or any other item instead of id use action config for button or use item id .to destroy a component using itemId simply use this`
Ext.ComponentQuery.query('list[action=diaryselectlist]')[0].destroy();
above it just destroying a list to whom i gave action not id you can give itemId instead of action in this ..
hope you will enjoy this