Add missing parameter to TableBorder.symmetric, and improve class constructors (#144279)
Originally, my aim was just to refactor (as per usual), but while messing around with the `TableBorder.symmetric` constructor, I realized that `borderRadius` was missing! This pull request makes a few class constructors more efficient, and it fixes #144277 by adding the missing parameter. <br>
This commit is contained in:
@@ -76,7 +76,7 @@ ${parser.usage}
|
||||
|
||||
final FrameworkRepository framework = FrameworkRepository(
|
||||
_localCheckouts(token),
|
||||
mirrorRemote: Remote.mirror(mirrorUrl),
|
||||
mirrorRemote: const Remote.mirror(mirrorUrl),
|
||||
upstreamRemote: Remote.upstream(upstreamUrl),
|
||||
);
|
||||
|
||||
|
||||
@@ -23,25 +23,11 @@ enum RemoteName {
|
||||
}
|
||||
|
||||
class Remote {
|
||||
const Remote({
|
||||
required RemoteName name,
|
||||
required this.url,
|
||||
}) : _name = name,
|
||||
assert(url != '');
|
||||
const Remote({required RemoteName name, required this.url})
|
||||
: _name = name, assert(url != '');
|
||||
|
||||
factory Remote.mirror(String url) {
|
||||
return Remote(
|
||||
name: RemoteName.mirror,
|
||||
url: url,
|
||||
);
|
||||
}
|
||||
|
||||
factory Remote.upstream(String url) {
|
||||
return Remote(
|
||||
name: RemoteName.upstream,
|
||||
url: url,
|
||||
);
|
||||
}
|
||||
const Remote.mirror(String url) : this(name: RemoteName.mirror, url: url);
|
||||
const Remote.upstream(String url) : this(name: RemoteName.upstream, url: url);
|
||||
|
||||
final RemoteName _name;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user