Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BoxDecoration borderRadius 数值从20变为0时不能正确显示。 #174

Closed
zhushuihua opened this issue May 15, 2022 · 0 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@zhushuihua
Copy link

zhushuihua commented May 15, 2022

import 'package:flutter/widgets.dart';
import 'package:mpcore/mpcore.dart';
import 'package:mpflutter_template/second_page.dart';

void main() {
  runApp(MyApp());
  MPCore().connectToHostChannel();
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MPApp(
      title: 'MPFlutter Demo',
      color: Colors.blue,
      routes: {
        '/': (context) => MyHomePage(),
        '/second': (context) => MySecondPage(),
      },
      navigatorObservers: [MPCore.getNavigationObserver()],
    );
  }
}

class MyHomePage extends StatefulWidget {
  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  double _radius = 20;
  var inside = false;
  @override
  Widget build(BuildContext context) {
    print(_radius);
    return MPScaffold(
      name: 'Template',
      body: Center(
          child: GestureDetector(
        onTap: () {
          setState(() {
            _radius = 0;
          });
        },
        child: Container(
          width: 100,
          height: 100,
          decoration: BoxDecoration(
            color: Colors.green,
            borderRadius: BorderRadius.circular(_radius),
          ),
        ),
      )),
    );
  }
}
@PonyCui PonyCui self-assigned this May 16, 2022
@PonyCui PonyCui added the bug Something isn't working label May 16, 2022
PonyCui added a commit that referenced this issue Dec 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants