
This reverts commit f41b3411da35929b09009e47cb52474389e42874, reversing changes made to e33d8d96212f3e337a6660f1eb1118bffc945bf5. This was a bad check-in due to my mangling uploading a new version of the branch from a different machine. This reverts https://github.com/flutter/flutter/pull/2639 and will be replaced by https://github.com/flutter/flutter/pull/2640
30 lines
762 B
Dart
30 lines
762 B
Dart
// Copyright (c) 2015 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
part of cassowary;
|
|
|
|
class Param extends _EquationMember {
|
|
final Variable variable;
|
|
dynamic context;
|
|
|
|
Param([double value = 0.0]) : variable = new Variable(value) {
|
|
variable._owner = this;
|
|
}
|
|
|
|
Param.withContext(ctx, [double value = 0.0])
|
|
: variable = new Variable(value),
|
|
context = ctx {
|
|
variable._owner = this;
|
|
}
|
|
|
|
bool get isConstant => false;
|
|
|
|
double get value => variable.value;
|
|
|
|
String get name => variable.name;
|
|
void set name(String name) { variable.name = name; }
|
|
|
|
Expression asExpression() => new Expression([new Term(variable, 1.0)], 0.0);
|
|
}
|