Simple declarations will cause no issue. It's good practice as long as those declarations are not stateful object that need proper disposal.
Also because of a function like the build method might be called frequently, you should avoid expensive computations there.