|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
|
import 'package:recook/constants/header.dart';
|
|
|
|
|
import 'package:tencent_live_fluttify/tencent_live_fluttify.dart';
|
|
|
|
|
|
|
|
|
|
class SmallWindowWidget extends StatefulWidget {
|
|
|
|
@ -24,8 +25,8 @@ class _SmallWindowWidgetState extends State<SmallWindowWidget> {
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
super.initState();
|
|
|
|
|
_topPos = ScreenUtil.statusBarHeight + 20;
|
|
|
|
|
_leftPos = 20;
|
|
|
|
|
_topPos = ScreenUtil.screenHeightDp - 20 - _height - 55;
|
|
|
|
|
_leftPos = _leftPos = ScreenUtil.screenWidthDp - 20 - _width;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@ -39,6 +40,10 @@ class _SmallWindowWidgetState extends State<SmallWindowWidget> {
|
|
|
|
|
return AnimatedPositioned(
|
|
|
|
|
left: _isHide ? -_width : _leftPos,
|
|
|
|
|
top: _topPos,
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
border: Border.all(color: Colors.white,width: rSize(1)),
|
|
|
|
|
),
|
|
|
|
|
child: Stack(
|
|
|
|
|
children: [
|
|
|
|
|
Positioned(
|
|
|
|
@ -87,8 +92,8 @@ class _SmallWindowWidgetState extends State<SmallWindowWidget> {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Positioned(
|
|
|
|
|
right: 10,
|
|
|
|
|
top: 10,
|
|
|
|
|
right: 5,
|
|
|
|
|
top: 5,
|
|
|
|
|
child: GestureDetector(
|
|
|
|
|
onTap: () {
|
|
|
|
|
setState(() {
|
|
|
|
@ -104,7 +109,7 @@ class _SmallWindowWidgetState extends State<SmallWindowWidget> {
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
color: Colors.white.withOpacity(0.3),
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -112,6 +117,7 @@ class _SmallWindowWidgetState extends State<SmallWindowWidget> {
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
curve: Curves.easeInOutCubic,
|
|
|
|
|
duration: _isMoving ? Duration.zero : Duration(milliseconds: 300),
|
|
|
|
|
);
|
|
|
|
|