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
SmartDialog.showAttach() 在手机上会闪烁一下 #82
Labels
enhancement
New feature or request
Comments
2022-10-26.4.21.42.mov看起来像是高亮highlightBuilder,出现的时机比maskColor要慢一点 |
嗯嗯,这俩天我会查查看 |
# flutter 3.x
dependencies:
flutter_smart_dialog: ^4.6.2
# flutter 2.x
dependencies:
flutter_smart_dialog: ^4.0.9+9
void main() => runApp(TestApp());
class TestApp extends StatelessWidget {
const TestApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Container(
color: Colors.white,
alignment: Alignment.center,
child: Builder(builder: (ctx) {
return ElevatedButton(
onPressed: () {
showDialog(
context: ctx,
barrierColor: Colors.transparent,
builder: (_) => TestHighlight(),
);
},
child: Text('test highlight'),
);
}),
),
);
}
}
class TestHighlight extends StatefulWidget {
const TestHighlight({Key? key}) : super(key: key);
@override
State<TestHighlight> createState() => _TestHighlightState();
}
class _TestHighlightState extends State<TestHighlight>
with TickerProviderStateMixin {
late AnimationController _controller;
@override
void initState() {
_controller = AnimationController(
vsync: this,
duration: Duration(milliseconds: 300),
);
_controller.forward();
super.initState();
}
@override
Widget build(BuildContext context) {
return FadeTransition(
opacity: CurvedAnimation(parent: _controller, curve: Curves.linear),
child: ColorFiltered(
colorFilter: ColorFilter.mode(
// 遮罩
Colors.black.withOpacity(0.6),
BlendMode.srcOut,
),
child: Stack(children: [
Container(
decoration: BoxDecoration(
color: Colors.white,
backgroundBlendMode: BlendMode.dstOut,
),
),
//highlight
Container(height: 100, width: 600, color: Colors.black),
]),
),
);
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
} |
flutter 3.xdependencies: 升级4.6.2 问题解决了 |
Flutter 3.3.9 问题依然存在 |
是说需要加上下面这个配置是吗,我单独给 showAttach 方法配置了,但是效果不是很明显 |
老哥决绝了没 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
版本信息
描述bug/需求
SmartDialog.showAttach() 在手机上会闪烁一下
问题demo
The text was updated successfully, but these errors were encountered: