forked from CCExtractor/ultimate_alarm_clock
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add overlay pop up over all apps for stop watch , fix issue CCExtract…
- Loading branch information
1 parent
b845af6
commit 4baddd8
Showing
6 changed files
with
389 additions
and
252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
lib/app/modules/stopwatch/views/stop_watch_overlay_pop_up.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import 'package:flutter/cupertino.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter/widgets.dart'; | ||
import 'package:get/get.dart'; | ||
import 'package:get/get_state_manager/src/simple/get_view.dart'; | ||
import 'package:overlay_pop_up/overlay_pop_up.dart'; | ||
import '../../../utils/constants.dart'; | ||
import '../controllers/stopwatch_controller.dart'; | ||
|
||
class StopWatchOverLayWidget extends GetView<StopwatchController> { | ||
const StopWatchOverLayWidget({Key? key}) : super(key: key); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Material( | ||
color: Colors.transparent, | ||
child: Stack( | ||
children: [ | ||
Container( | ||
decoration: BoxDecoration( | ||
borderRadius: BorderRadius.circular(20), | ||
color: kprimaryColor , | ||
), | ||
child: Center( | ||
child: StreamBuilder( | ||
stream: OverlayPopUp.dataListener, | ||
builder: (BuildContext context, AsyncSnapshot snapshot) { | ||
String _data = snapshot.data?['time'] ?? ''; | ||
return Text( | ||
_data, | ||
style: const TextStyle( | ||
fontSize: 30.0, | ||
fontWeight: FontWeight.bold, | ||
), | ||
); | ||
}, | ||
), | ||
), | ||
), | ||
Positioned( | ||
top: -10, | ||
left: -11, | ||
child: IconButton(onPressed: ()async{ | ||
await OverlayPopUp.closeOverlay(); | ||
}, icon: const Icon(Icons.close,size: 20,) ), | ||
), | ||
], | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.