相关疑难解决方法(0)

如何在双击时动态隐藏AppBar?

我想在容器上的 DoubleTap 上动态隐藏和显示应用程序栏,并带有一些隐藏动画,但此链接的解决方案不适用于我的项目:Flutter - How can Idynamic show or hide App Bars onpages

该应用程序的图片: 图像

代码:

import 'package:flutter/material.dart';

class GeneratedCouponScreen extends StatelessWidget {

  bool ShowAppBar = true;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: ShowAppBar ? AppBar(
        title: Text('Makdolan Flutter'),
      ) : null ,
      backgroundColor: Colors.white,
      body: GestureDetector(
        onDoubleTap: () {
          ShowAppBar = false;
        },
        child: Container(
        padding: EdgeInsets.all(16.0),
        child: Column(
          children: [
            Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  Text('DATA WYDANIA:', style: TextStyle(color: Colors.black),),
                  Text('10/09/2019', …
Run Code Online (Sandbox Code Playgroud)

dart flutter flutter-layout

4
推荐指数
1
解决办法
3448
查看次数

如何在Flutter中创建的应用程序中隐藏AppBar

我有下面的代码,我想隐藏栏应用程序,可以吗?我已经尝试直接使用 Android 主题,但没有成功。:(

  @override
  Widget build(BuildContext context) {
    return WebviewScaffold(
      appBar: AppBar(
        title: TextField(
          autofocus: false,
          controller: controller,
          textInputAction: TextInputAction.go,
          onSubmitted: (url) => launchUrl(),
          style: TextStyle(color: Colors.white),
          decoration: InputDecoration(
            border: InputBorder.none,
            hintText: "Digite a URL",
            hintStyle: TextStyle(color: Colors.white),
          ),
        ),
        actions: <Widget>[
          IconButton(
            icon: Icon(Icons.navigate_next),
            onPressed: () => launchUrl(),
          )
        ],
      ),
Run Code Online (Sandbox Code Playgroud)

flutter

2
推荐指数
1
解决办法
2万
查看次数

标签 统计

flutter ×2

dart ×1

flutter-layout ×1