import 'package:flutter/material.dart';

main() => runApp(MaterialApp(
home: HomePage(),
)); class HomePage extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return HomePageState();
}
} class HomePageState extends State<HomePage> {
double w, h;
double page;
double draw = 0.0;
double i = 50;
bool ini = true; @override
Widget build(BuildContext context) {
w = MediaQuery.of(context).size.width;
h = MediaQuery.of(context).size.height; if(ini) {
page = w;
ini = !ini;
} return SafeArea(
child: Scaffold(
body: Container(
width: w, height: h,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(color: Colors.black, width: draw,),
Container(
width: page,
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Container(color: Colors.amberAccent,child: Text('atest'),)),
),
],
),
),
floatingActionButton: FloatingActionButton(onPressed: (){
setState(() {
draw = w * 3/5;
page = w * 2/5;
});
}),
),
);
}
}

  

custom drawer的更多相关文章

  1. WebRTC中Android Demo中的远程视频流的获取到传输

    1.CallActivity#onCreate 执行startCall开始连接或创建房间 2.WebSocketClient#connectToRoom 请求一次服务器 3.回调到CallActivi ...

  2. Android Navigation Drawer,自定义ActionBar(标题居中)

    整个示例都是改造自 Google Android Training 中的 NavigationDrawer 示例(http://developer.android.com/training/imple ...

  3. Drawer Layout

    http://developer.android.com/training/implementing-navigation/nav-drawer.html#DrawerLayout <menu ...

  4. Android UI开发第三十三篇——Navigation Drawer For Android API 7

    Creating a Navigation Drawer中使用的Navigation Drawer的android:minSdkVersion="14",现在Android API ...

  5. Android Navigation Drawer(导航抽屉)

    Google I/O 2013 Android 更新了Support库,新版本的Support库中新加入了几个比较重要的功能. 添加 DrawerLayout 控件,支持创建  Navigation ...

  6. Unity编辑器扩展-Custom List, displaying data your way

    本文转自http://catlikecoding.com/unity/tutorials/editor/custom-list/ Custom List, displaying data your w ...

  7. AutoMapper:Unmapped members were found. Review the types and members below. Add a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type

    异常处理汇总-后端系列 http://www.cnblogs.com/dunitian/p/4523006.html 应用场景:ViewModel==>Mode映射的时候出错 AutoMappe ...

  8. Spring Enable annotation – writing a custom Enable annotation

    原文地址:https://www.javacodegeeks.com/2015/04/spring-enable-annotation-writing-a-custom-enable-annotati ...

  9. SharePoint2013 Set a custom application page as site welcome page

    本文主要介绍如何添加一个custom application page as site welcome page 1.首先创建一个sharepoint 2013 empty solution, add ...

随机推荐

  1. [技术博客]Pyqt中View类别容器和Widget类别容器的区别

    Pyqt中View类别容器和Widget类别容器的区别 简介 在beta迭代中,我们选择用pyqt5来重写alpha迭代中使用tkinter库编写的界面. ​ 按钮之类的与tkiner使用无异,在显示 ...

  2. 利用Windows内置工具winsat测试硬盘速度(SSD&机械盘对比)

    利用Windows内置工具winsat测试硬盘速度(SSD&机械盘对比) 以下是红色内容是在命令行运行: C:\Users\Administrator>winsat diskWindow ...

  3. Python3爬取美女妹子图片转载

    # -*- coding: utf-8 -*- """ Created on Sun Dec 30 15:38:25 2018 @author: 球球 "&qu ...

  4. 【转】Android Fastboot 与 Recovery 和刷机

    1. 首先来看下Android系统的分区:   Android系统的分区.jpg   Android分区解释.png 安卓系统一般把rom芯片分成7个区,如果再加上内置sd卡这个分区,就是8个: hb ...

  5. Anaconda用conda创建python虚拟环境

    Anaconda用conda创建python虚拟环境 一.简介 conda可以理解为一个工具,也是一个可执行命令,其核心功能是包管理与环境管理.包管理与pip的使用类似,环境管理则允许用户方便地安装不 ...

  6. 【Python】解析Python中函数的基本使用

    1.简介 在Python中定义函数的基本格式为: def <函数名>(参数列表): <函数语句> return <返回值> Python中的函数形式比较灵活,声明一 ...

  7. IntelliJ IDEA破解教程汇总

    IDEA是一款很好用的工具,若资金允许,请点击https://www.jetbrains.com/idea/buy/购买正版,谢谢合作. 目前破解的方式主要有三种,注册机.破解补丁.注册码,下面分别介 ...

  8. [ kvm ] 三种基础网络模型创建及分析

    1. 前言 最近在模拟生产环境在做测试,本来准备用 vmware 直接来实现的,本着学以致用的道理,选择直接在linux 环境使用 kvm 来模拟测试,遇到的第一个问题就是,网络环境的模拟.这里对比v ...

  9. (转) 解决django项目部署到nginx+uwsgi服务器后 admin页面样式消失的问题

    原贴地址:https://blog.csdn.net/qq_42571805/article/details/80862455 摘要 uwsgi为主要服务器,nginx为反向代理服务器部署完成之后发现 ...

  10. fail2ban的功能和特性(实测)

    fail2ban的功能和特性 https://fedoraproject.org/wiki/Fail2ban_with_FirewallD 1.支持大量服务.如sshd,apache,qmail,pr ...