use conditional assignment (#9252)
This commit is contained in:
committed by
GitHub
parent
3eb87830e9
commit
8bcf302e23
@@ -60,9 +60,7 @@ abstract class SyntaxHighlighter { // ignore: one_member_abstracts
|
||||
class DartSyntaxHighlighter extends SyntaxHighlighter {
|
||||
DartSyntaxHighlighter([this._style]) {
|
||||
_spans = <_HighlightSpan>[];
|
||||
|
||||
if (_style == null)
|
||||
_style = SyntaxHighlighterStyle.darkThemeStyle();
|
||||
_style ??= SyntaxHighlighterStyle.darkThemeStyle();
|
||||
}
|
||||
|
||||
SyntaxHighlighterStyle _style;
|
||||
|
||||
@@ -78,8 +78,7 @@ Duration timeBase;
|
||||
RenderTransform transformBox;
|
||||
|
||||
void rotate(Duration timeStamp) {
|
||||
if (timeBase == null)
|
||||
timeBase = timeStamp;
|
||||
timeBase ??= timeStamp;
|
||||
final double delta = (timeStamp - timeBase).inMicroseconds.toDouble() / Duration.MICROSECONDS_PER_SECOND; // radians
|
||||
|
||||
transformBox.setIdentity();
|
||||
|
||||
Reference in New Issue
Block a user