CopyPastor

Detecting plagiarism made easy.

Score: 1.8425699734739749; Reported for: String similarity, Exact paragraph match Open both answers

Possible Plagiarism

Plagiarized on 2021-02-11
by Nikunj Munjiyasara

Original Post

Original - Posted on 2020-09-02
by Apurv Jha



            
Present in both answers; Present only in the new answer; Present only in the old answer;

First import the services package:
import 'package:flutter/services.dart';
This will give you access to the SystemChrome class, which "Controls specific aspects of the operating system's graphical interface and how it interacts with the application."
When you load the Widget, do something like this:
@override void initState(){ super.initState(); SystemChrome.setPreferredOrientations([ DeviceOrientation.landscapeRight, DeviceOrientation.landscapeLeft, ]); }
then when I leave the page, put it back to normal like this:
@override dispose(){ SystemChrome.setPreferredOrientations([ DeviceOrientation.landscapeRight, DeviceOrientation.landscapeLeft, DeviceOrientation.portraitUp, DeviceOrientation.portraitDown, ]); super.dispose(); }
First import the services package:
import `package:flutter/services.dart`;
This will give you access to the `SystemChrome` class, which `"Controls specific aspects of the operating system's graphical interface and how it interacts with the application."`
When you load the Widget, do something like this:
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-html -->
@override void initState(){ super.initState(); SystemChrome.setPreferredOrientations([ DeviceOrientation.landscapeRight, DeviceOrientation.landscapeLeft, ]); }
<!-- end snippet -->
then when I leave the page, put it back to normal like this:
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-html -->
@override dispose(){ SystemChrome.setPreferredOrientations([ DeviceOrientation.landscapeRight, DeviceOrientation.landscapeLeft, DeviceOrientation.portraitUp, DeviceOrientation.portraitDown, ]); super.dispose(); }
<!-- end snippet -->


        
Present in both answers; Present only in the new answer; Present only in the old answer;