Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Dart 如何使用锚定布局_Dart_Rikulo - Fatal编程技术网

Dart 如何使用锚定布局

Dart 如何使用锚定布局,dart,rikulo,Dart,Rikulo,我正在努力掌握锚定布局的用法。我有以下代码构造函数: LokationView() { buildCityUi(); buildRegionUi(); } buildCityUi() { cityLbl = new TextView( 'City' ); addChild( cityLbl ); cityTxBx = new TextBox( null, 'text' ) ..profile.width = 'flex ' ..profile.ancho

我正在努力掌握锚定布局的用法。我有以下代码构造函数:

LokationView()
{


  buildCityUi();
  buildRegionUi();



}

buildCityUi()
{
  cityLbl = new TextView( 'City' );
  addChild( cityLbl );

  cityTxBx = new TextBox( null, 'text' )
  ..profile.width = 'flex '
  ..profile.anchorView = cityLbl
  ..profile.location = 'east center'
  ..on.layout.listen( (_) 
    {
      cityTxBx.width = 200;
      cityTxBx.requestLayout();  
    });


  addChild(cityTxBx );

}

buildRegionUi()
{

  regionLbl = new TextView( 'Region' )
  ..profile.anchorView = cityLbl
  ..profile.location = 'south start';    
  addChild( regionLbl );

  regionTxBx = new TextBox( null, 'text' )
  ..profile.width = 'flex 1'
  ..profile.anchorView = regionLbl
  ..profile.location = 'east center';
  addChild( regionTxBx );
}
我正在努力完成以下工作: 1.创建带有相应文本框视图的标签视图。 2.让文本框视图占据剩余的浏览器空间,视图随浏览器宽度的变化而变化


谢谢

主持人不是答案。相反,我会帮忙的