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:
Nate
2024-03-04 13:20:19 -07:00
committed by GitHub
parent 1d7f4a9afa
commit 1a0dc8f1e1
36 changed files with 195 additions and 356 deletions

View File

@@ -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),
);

View File

@@ -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;