Skip to content

Commit 4551aaa

Browse files
committed
dnd, icon changes
1 parent fe8440a commit 4551aaa

2 files changed

Lines changed: 19 additions & 14 deletions

File tree

lib/pages/readerscreen.dart

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -310,15 +310,18 @@ class _MyReaderPageState extends State<ReaderScreen> {
310310
: null,
311311
floatingActionButton: Visibility(
312312
visible: _checkTopActionVisibility(),
313-
child: FloatingActionButton.extended(
314-
onPressed: () {
315-
_controller.animateTo(0.0,
316-
duration: new Duration(milliseconds: 500),
317-
curve: Curves.ease);
318-
},
319-
icon: Icon(Icons.vertical_align_top),
320-
label: Text("Top"),
321-
backgroundColor: Colors.blue,
313+
child: SizedBox(
314+
width: 50,
315+
height: 50,
316+
child: FloatingActionButton(
317+
onPressed: () {
318+
_controller.animateTo(0.0,
319+
duration: new Duration(milliseconds: 500),
320+
curve: Curves.ease);
321+
},
322+
child: Icon(Icons.vertical_align_top_rounded),
323+
backgroundColor: Colors.blue,
324+
),
322325
)));
323326
}));
324327
return result;

lib/redux/reducers/dndreducer.dart

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ final dndReducer = combineReducers<bool>([
99
bool _activeDNDReducer(bool isDND, ToggleDNDAction action) {
1010
if (action.isDnd) {
1111
if (action.hasNPAccess) {
12-
FlutterDnd.setInterruptionFilter(
13-
FlutterDnd.INTERRUPTION_FILTER_ALL); //Turn on DND
14-
} else {
15-
FlutterDnd.gotoPolicySettings();
16-
}
12+
FlutterDnd.setInterruptionFilter(
13+
FlutterDnd.INTERRUPTION_FILTER_ALL); //Turn on DND
14+
} else {
15+
FlutterDnd.gotoPolicySettings();
16+
}
17+
} else {
18+
FlutterDnd.setInterruptionFilter(FlutterDnd.INTERRUPTION_FILTER_NONE);
1719
}
1820

1921
return action.isDnd;

0 commit comments

Comments
 (0)